MENU navbar-image

Introduction

API Endpoints for the Memberz.Org service

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {auth-token}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Generate an auth token by calling the login endpoint with a valid username and password combo

Activity Logs

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/activity_logs/search" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/activity_logs/search"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/activity_logs/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get Log Groups

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/activity_logs/log_groups" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/activity_logs/log_groups"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/activity_logs/log_groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/activity_logs/log_groups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Auth

Forgot Password

requires authentication

Send a reset password link to user email. This endpoint allows user to reset their forgotten password.

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/forgot-password" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"username\": \"john@mail.com\"
}"
const url = new URL(
    "http://api.memberz.test/api/auth/forgot-password"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "username": "john@mail.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/forgot-password';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'username' => 'john@mail.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid user / email specified"
}
 

Request      

POST api/auth/forgot-password

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

username   email   

The email for the password reset link. Example: john@mail.com

Reset Password

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/reset-password" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"username\": \"john@mail.com\",
    \"token\": \"123010100101\",
    \"password\": \"mypassword02\"
}"
const url = new URL(
    "http://api.memberz.test/api/auth/reset-password"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "username": "john@mail.com",
    "token": "123010100101",
    "password": "mypassword02"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/reset-password';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'username' => 'john@mail.com',
            'token' => '123010100101',
            'password' => 'mypassword02',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Password reset successful"
}
 

Example response (401):


{
    "message": "Error resetting password"
}
 

Request      

POST api/auth/reset-password

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

username   string   

User email. Example: john@mail.com

token   string   

Password Reset Token. Example: 123010100101

password   string   

New User Password. Example: mypassword02

Register new user/member

requires authentication

This endpoint allows to create new user account.

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/register" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Ansah\",
    \"email\": \"john.ansah@mail.com\",
    \"gender\": \"male\",
    \"dob\": \"1980-01-03\",
    \"mobile_number\": \"+2332440000001\",
    \"password\": \"mypassword01\"
}"
const url = new URL(
    "http://api.memberz.test/api/auth/register"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "first_name": "John",
    "last_name": "Ansah",
    "email": "john.ansah@mail.com",
    "gender": "male",
    "dob": "1980-01-03",
    "mobile_number": "+2332440000001",
    "password": "mypassword01"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/register';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'first_name' => 'John',
            'last_name' => 'Ansah',
            'email' => 'john.ansah@mail.com',
            'gender' => 'male',
            'dob' => '1980-01-03',
            'mobile_number' => '+2332440000001',
            'password' => 'mypassword01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Successfully created account"
}
 

Request      

POST api/auth/register

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

first_name   string   

User First Name. Example: John

last_name   string   

User Last Name. Example: Ansah

email   string   

user Email. Example: john.ansah@mail.com

gender   string   

User Gender. Example: male

dob   string   

User Date of Birth. Example: 1980-01-03

mobile_number   string   

Mobile Number of User. Example: +2332440000001

password   string   

User Password. Example: mypassword01

Login

Get a JWT via given credentials.

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"username\": \"john@mail.com\",
    \"password\": \"mypassword01\"
}"
const url = new URL(
    "http://api.memberz.test/api/auth/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "username": "john@mail.com",
    "password": "mypassword01"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/login';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'username' => 'john@mail.com',
            'password' => 'mypassword01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "error": "Unauthorized",
    "message": "Account not found"
}
 

Request      

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

username   email   

User Email. Example: john@mail.com

password   string   

User Password. Example: mypassword01

Verify Account

requires authentication

Verify Newly Created User Account

This endpoint provides email verification for newly created user accounts

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/auth/verify/et" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/auth/verify/et"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/verify/et';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "message": "Account creation verification successful"
}
 

Example response (401):


{
    "message": "Invalid login attempt"
}
 

Request      

GET api/auth/verify/{token}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

token   string   

Example: et

Get the validity of 2FA code

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/2fa-validate" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"code\": \"ipsa\"
}"
const url = new URL(
    "http://api.memberz.test/api/auth/2fa-validate"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "code": "ipsa"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/2fa-validate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'code' => 'ipsa',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (422):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "status": "error",
    "message": [
        "The selected code is invalid."
    ]
}
 

Request      

POST api/auth/2fa-validate

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

code   string   

Example: ipsa

Logout

requires authentication

Log the user out (Invalidate the token).

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/logout" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/auth/logout"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/logout';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "App\\Services\\AuthLogService::logLogout(): Argument #1 ($account) must be of type App\\Models\\MemberAccount, null given, called in D:\\memberz-api\\app\\Http\\Controllers\\AuthController.php on line 172",
    "exception": "TypeError",
    "file": "D:\\memberz-api\\app\\Services\\AuthLogService.php",
    "line": 9,
    "trace": [
        {
            "file": "D:\\memberz-api\\app\\Http\\Controllers\\AuthController.php",
            "line": 172,
            "function": "logLogout",
            "class": "App\\Services\\AuthLogService",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php",
            "line": 54,
            "function": "logout",
            "class": "App\\Http\\Controllers\\AuthController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php",
            "line": 43,
            "function": "callAction",
            "class": "Illuminate\\Routing\\Controller",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 260,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\ControllerDispatcher",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 206,
            "function": "runController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 806,
            "function": "run",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

POST api/auth/logout

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Refresh a token.

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/auth/refresh" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/auth/refresh"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/refresh';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "The token has been blacklisted",
    "exception": "PHPOpenSourceSaver\\JWTAuth\\Exceptions\\TokenBlacklistedException",
    "file": "D:\\memberz-api\\vendor\\php-open-source-saver\\jwt-auth\\src\\Manager.php",
    "line": 114,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\php-open-source-saver\\jwt-auth\\src\\Manager.php",
            "line": 132,
            "function": "decode",
            "class": "PHPOpenSourceSaver\\JWTAuth\\Manager",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\php-open-source-saver\\jwt-auth\\src\\JWT.php",
            "line": 99,
            "function": "refresh",
            "class": "PHPOpenSourceSaver\\JWTAuth\\Manager",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\php-open-source-saver\\jwt-auth\\src\\JWTGuard.php",
            "line": 201,
            "function": "refresh",
            "class": "PHPOpenSourceSaver\\JWTAuth\\JWT",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Auth\\AuthManager.php",
            "line": 341,
            "function": "refresh",
            "class": "PHPOpenSourceSaver\\JWTAuth\\JWTGuard",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Controllers\\AuthController.php",
            "line": 186,
            "function": "__call",
            "class": "Illuminate\\Auth\\AuthManager",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php",
            "line": 54,
            "function": "refresh",
            "class": "App\\Http\\Controllers\\AuthController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php",
            "line": 43,
            "function": "callAction",
            "class": "Illuminate\\Routing\\Controller",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 260,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\ControllerDispatcher",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 206,
            "function": "runController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 806,
            "function": "run",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

POST api/auth/refresh

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

User Profile

requires authentication

Get the authenticated User.

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/auth/me" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/auth/me"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/auth/me';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "status": "error",
    "message": "Unauthenticated"
}
 

Request      

GET api/auth/me

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

2FA - Send Code

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/2fa/send-code" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"verification_type\": \"rerum\"
}"
const url = new URL(
    "http://api.memberz.test/api/2fa/send-code"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "verification_type": "rerum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/2fa/send-code';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'verification_type' => 'rerum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/2fa/send-code

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

verification_type   string   

Example: rerum

2FA - Enable

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/2fa/enable" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"code\": \"voluptas\"
}"
const url = new URL(
    "http://api.memberz.test/api/2fa/enable"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "code": "voluptas"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/2fa/enable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'code' => 'voluptas',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/2fa/enable

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

code   string   

Example: voluptas

2FA - Disable

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/2fa/disable" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/2fa/disable"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/2fa/disable';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/2fa/disable

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Banks

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/banks/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/banks/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/banks/search?limit=3&page=1&sort=latest&fieldName=quae" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quae",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/banks?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/banks

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/banks" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/banks

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/banks/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks/12';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/banks/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 12

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/banks/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/banks/{id}

PATCH api/banks/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the bank. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/banks/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/banks/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/banks/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/banks/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the bank. Example: 1

Batch Requests

Batch Request

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/batch" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/batch"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/batch';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "responses": []
}
 

Request      

POST api/batch

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Birthdays

GET api/organisation_members/birthdays

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/birthdays" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/birthdays"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/birthdays';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members/birthdays

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Birthday Summary

requires authentication

Get quick information about birthdays happening with the current month

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/birthdays/summary" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/birthdays/summary"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/birthdays/summary';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members/birthdays/summary

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Contribution Receipt Settings

Get Settings

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_receipt_settings" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipt_settings"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipt_settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_receipt_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/contribution_receipt_settings" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipt_settings"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipt_settings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/contribution_receipt_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Settings

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/contribution_receipt_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": \"dicta\",
    \"receipt_mode\": \"ullam\",
    \"receipt_prefix\": \"ipsa\",
    \"receipt_postfix\": \"dolor\",
    \"receipt_counter\": \"officia\",
    \"default_currency\": \"deleniti\",
    \"sms_notify\": false
}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipt_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": "dicta",
    "receipt_mode": "ullam",
    "receipt_prefix": "ipsa",
    "receipt_postfix": "dolor",
    "receipt_counter": "officia",
    "default_currency": "deleniti",
    "sms_notify": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipt_settings/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 'dicta',
            'receipt_mode' => 'ullam',
            'receipt_prefix' => 'ipsa',
            'receipt_postfix' => 'dolor',
            'receipt_counter' => 'officia',
            'default_currency' => 'deleniti',
            'sms_notify' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/contribution_receipt_settings/{id}

PATCH api/contribution_receipt_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution receipt setting. Example: 1

Body Parameters

organisation_id   numeric   

Organisation id Example: dicta

receipt_mode   string   

'auto|manual' Example: ullam

receipt_prefix   string  optional  

Example: ipsa

receipt_postfix   string  optional  

Example: dolor

receipt_counter   numeric  optional  

Example: officia

default_currency   numeric  optional  

default currency id Example: deleniti

sms_notify   boolean  optional  

Example: false

Contribution Receipts

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_receipts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_receipts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_receipts/search?limit=3&page=1&sort=latest&fieldName=aut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "aut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'aut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_receipts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_receipts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/contribution_receipts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/contribution_receipts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_receipts/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts/12';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/contribution_receipts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 12

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/contribution_receipts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/contribution_receipts/{id}

PATCH api/contribution_receipts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution receipt. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/contribution_receipts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_receipts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_receipts/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/contribution_receipts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution receipt. Example: 1

Contribution Summary Reports

Get Contribution Summaries

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_summaries" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_summaries"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_summaries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_summaries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Report by Weekly Breakdown

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_summaries/weekly_breakdown" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_summaries/weekly_breakdown"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_summaries/weekly_breakdown';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_summaries/weekly_breakdown

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Total Contributions By Type

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_summaries/totals_by_category" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_summaries/totals_by_category"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_summaries/totals_by_category';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_summaries/totals_by_category

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Contribution Summaries By Category

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_summaries/category_breakdown" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_summaries/category_breakdown"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_summaries/category_breakdown';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_summaries/category_breakdown

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Contribution Trends

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_summaries/trend_report" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_summaries/trend_report"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_summaries/trend_report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_summaries/trend_report

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Contribution Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_types/search?limit=3&page=1&sort=latest&fieldName=quis" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/contribution_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/contribution_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_types/20" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types/20"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types/20';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/contribution_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 20

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/contribution_types/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types/2';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/contribution_types/{id}

PATCH api/contribution_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution type. Example: 2

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/contribution_types/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_types/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_types/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/contribution_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution type. Example: 2

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_payment_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_payment_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_payment_types/search?limit=3&page=1&sort=latest&fieldName=voluptatem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "voluptatem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'voluptatem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_payment_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contribution_payment_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/contribution_payment_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/contribution_payment_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contribution_payment_types/9" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types/9"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types/9';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/contribution_payment_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 9

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/contribution_payment_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/contribution_payment_types/{id}

PATCH api/contribution_payment_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution payment type. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/contribution_payment_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contribution_payment_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contribution_payment_types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/contribution_payment_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution payment type. Example: 1

Contributions

Get Available Years

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contributions/available_years" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions/available_years"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/available_years';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contributions/available_years

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contributions/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contributions/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contributions/search?limit=3&page=1&sort=latest&fieldName=porro" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "porro",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'porro',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contributions?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/contributions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Contribution

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/contributions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": \"1\",
    \"organisation_member_id\": \"1234\",
    \"module_contribution_type_id\": \"1\",
    \"module_contribution_receipt_id\": \"12\",
    \"module_contribution_payment_type_id\": \"1\",
    \"bank_id\": \"123\",
    \"currency_id\": \"15\",
    \"organisation_file_import_id\": \"145\",
    \"description\": \"Monthly payment\",
    \"week\": \"1\",
    \"month\": \"11\",
    \"year\": \"2020\",
    \"cheque_status\": \"Cleared\",
    \"cheque_number\": \"001010\",
    \"amount\": \"80\",
    \"receipt_no\": \"010010\",
    \"receipt_dt\": \"2020-01-01\",
    \"active\": true,
    \"send_sms\": true
}"
const url = new URL(
    "http://api.memberz.test/api/contributions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": "1",
    "organisation_member_id": "1234",
    "module_contribution_type_id": "1",
    "module_contribution_receipt_id": "12",
    "module_contribution_payment_type_id": "1",
    "bank_id": "123",
    "currency_id": "15",
    "organisation_file_import_id": "145",
    "description": "Monthly payment",
    "week": "1",
    "month": "11",
    "year": "2020",
    "cheque_status": "Cleared",
    "cheque_number": "001010",
    "amount": "80",
    "receipt_no": "010010",
    "receipt_dt": "2020-01-01",
    "active": true,
    "send_sms": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => '1',
            'organisation_member_id' => '1234',
            'module_contribution_type_id' => '1',
            'module_contribution_receipt_id' => '12',
            'module_contribution_payment_type_id' => '1',
            'bank_id' => '123',
            'currency_id' => '15',
            'organisation_file_import_id' => '145',
            'description' => 'Monthly payment',
            'week' => '1',
            'month' => '11',
            'year' => '2020',
            'cheque_status' => 'Cleared',
            'cheque_number' => '001010',
            'amount' => '80',
            'receipt_no' => '010010',
            'receipt_dt' => '2020-01-01',
            'active' => true,
            'send_sms' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 21,
        "organisation_member_id": null,
        "module_contribution_type_id": 2,
        "module_contribution_receipt_id": 1,
        "description": "",
        "week": 4,
        "month": 1,
        "year": 2015,
        "module_contribution_payment_type_id": 1,
        "cheque_status": "Not Cleared",
        "cheque_number": null,
        "bank_id": null,
        "amount": 10,
        "currency_id": 80,
        "organisation_file_import_id": null,
        "created": "2015-01-19T12:54:00.000000Z",
        "modified": "2015-07-31T08:28:49.000000Z",
        "active": true,
        "contribution_type": {
            "id": 2,
            "organisation_id": 21,
            "name": "Welfare",
            "description": "Welfare Collection",
            "member_required": "",
            "fix_amount_per_period": false,
            "currency_id": null,
            "fixed_amount": null,
            "system_generated": false,
            "created": null,
            "modified": null,
            "active": true
        },
        "member_id": null,
        "member_name": null,
        "payment_type": "Cash",
        "currency_code": "GHS",
        "receipt_no": "11",
        "receipt_dt": "2015-07-31",
        "month_name": "January",
        "bank": null
    }
}
 

Request      

POST api/contributions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   numeric  optional  

Organisation id. Example: 1

organisation_member_id   numeric  optional  

Organisation Member id. Example: 1234

module_contribution_type_id   numeric  optional  

Module contribution type id. Example: 1

module_contribution_receipt_id   numeric  optional  

Module contribution receipt id. Example: 12

module_contribution_payment_type_id   numeric  optional  

Module contribution payment type id. Example: 1

bank_id   numeric  optional  

Bank id. Example: 123

currency_id   numeric  optional  

Currency id. Example: 15

organisation_file_import_id   numeric  optional  

Organisation file import id. Example: 145

description   string  optional  

Description. Example: Monthly payment

week   numeric  optional  

Week. Example: 1

month   numeric  optional  

month. Example: 11

year   numeric  optional  

year. Example: 2020

cheque_status   enum  optional  

'Cleared|Not Cleared'. Example: Cleared

cheque_number   string  optional  

Cheque Number. Example: 001010

amount   numeric  optional  

Amount. Example: 80

receipt_no   string   

Receipt no. Example: 010010

receipt_dt   date   

Receipt date. Example: 2020-01-01

active   boolean  optional  

Active: Example: true

send_sms   boolean   

Example: true

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/contributions/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/contributions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Contribution

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/contributions/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": \"1\",
    \"organisation_member_id\": \"1234\",
    \"module_contribution_type_id\": \"1\",
    \"module_contribution_receipt_id\": \"12\",
    \"module_contribution_payment_type_id\": \"1\",
    \"bank_id\": \"123\",
    \"currency_id\": \"15\",
    \"organisation_file_import_id\": \"145\",
    \"description\": \"Monthly payment\",
    \"week\": \"1\",
    \"month\": \"11\",
    \"year\": \"2020\",
    \"cheque_status\": \"Cleared\",
    \"cheque_number\": \"001010\",
    \"amount\": \"80\",
    \"receipt_no\": \"010010\",
    \"receipt_dt\": \"2020-01-01\",
    \"active\": true,
    \"send_sms\": false
}"
const url = new URL(
    "http://api.memberz.test/api/contributions/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": "1",
    "organisation_member_id": "1234",
    "module_contribution_type_id": "1",
    "module_contribution_receipt_id": "12",
    "module_contribution_payment_type_id": "1",
    "bank_id": "123",
    "currency_id": "15",
    "organisation_file_import_id": "145",
    "description": "Monthly payment",
    "week": "1",
    "month": "11",
    "year": "2020",
    "cheque_status": "Cleared",
    "cheque_number": "001010",
    "amount": "80",
    "receipt_no": "010010",
    "receipt_dt": "2020-01-01",
    "active": true,
    "send_sms": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => '1',
            'organisation_member_id' => '1234',
            'module_contribution_type_id' => '1',
            'module_contribution_receipt_id' => '12',
            'module_contribution_payment_type_id' => '1',
            'bank_id' => '123',
            'currency_id' => '15',
            'organisation_file_import_id' => '145',
            'description' => 'Monthly payment',
            'week' => '1',
            'month' => '11',
            'year' => '2020',
            'cheque_status' => 'Cleared',
            'cheque_number' => '001010',
            'amount' => '80',
            'receipt_no' => '010010',
            'receipt_dt' => '2020-01-01',
            'active' => true,
            'send_sms' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 21,
        "organisation_member_id": null,
        "module_contribution_type_id": 2,
        "module_contribution_receipt_id": 1,
        "description": "",
        "week": 4,
        "month": 1,
        "year": 2015,
        "module_contribution_payment_type_id": 1,
        "cheque_status": "Not Cleared",
        "cheque_number": null,
        "bank_id": null,
        "amount": 10,
        "currency_id": 80,
        "organisation_file_import_id": null,
        "created": "2015-01-19T12:54:00.000000Z",
        "modified": "2015-07-31T08:28:49.000000Z",
        "active": true,
        "contribution_type": {
            "id": 2,
            "organisation_id": 21,
            "name": "Welfare",
            "description": "Welfare Collection",
            "member_required": "",
            "fix_amount_per_period": false,
            "currency_id": null,
            "fixed_amount": null,
            "system_generated": false,
            "created": null,
            "modified": null,
            "active": true
        },
        "member_id": null,
        "member_name": null,
        "payment_type": "Cash",
        "currency_code": "GHS",
        "receipt_no": "11",
        "receipt_dt": "2015-07-31",
        "month_name": "January",
        "bank": null
    }
}
 

Request      

PUT api/contributions/{id}

PATCH api/contributions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution. Example: 1

Body Parameters

organisation_id   numeric  optional  

Organisation id. Example: 1

organisation_member_id   numeric  optional  

Organisation Member id. Example: 1234

module_contribution_type_id   numeric  optional  

Module contribution type id. Example: 1

module_contribution_receipt_id   numeric  optional  

Module contribution receipt id. Example: 12

module_contribution_payment_type_id   numeric  optional  

Module contribution payment type id. Example: 1

bank_id   numeric  optional  

Bank id. Example: 123

currency_id   numeric  optional  

Currency id. Example: 15

organisation_file_import_id   numeric  optional  

Organisation file import id. Example: 145

description   string  optional  

Description. Example: Monthly payment

week   numeric  optional  

Week. Example: 1

month   numeric  optional  

month. Example: 11

year   numeric  optional  

year. Example: 2020

cheque_status   enum  optional  

'Cleared|Not Cleared'. Example: Cleared

cheque_number   string  optional  

Cheque Number. Example: 001010

amount   numeric  optional  

Amount. Example: 80

receipt_no   string   

Receipt no. Example: 010010

receipt_dt   date   

Receipt date. Example: 2020-01-01

active   boolean  optional  

Active: Example: true

send_sms   boolean   

Example: false

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/contributions/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/contributions/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/contributions/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/contributions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the contribution. Example: 1

Countries

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/countries/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/countries/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/countries/search?limit=3&page=1&sort=latest&fieldName=odit" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "odit",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'odit',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/countries?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/countries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/countries" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/countries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/countries/4" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries/4"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries/4';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/countries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 4

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/countries/23" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries/23"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries/23';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/countries/{id}

PATCH api/countries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the country. Example: 23

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/countries/23" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/countries/23"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/countries/23';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/countries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the country. Example: 23

Currencies

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/currencies/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/currencies/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/currencies/search?limit=3&page=1&sort=latest&fieldName=neque" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "neque",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'neque',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/currencies?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/currencies

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/currencies" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/currencies

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/currencies/10" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies/10"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies/10';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/currencies/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 10

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/currencies/23" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies/23"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies/23';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/currencies/{id}

PATCH api/currencies/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the currency. Example: 23

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/currencies/23" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/currencies/23"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/currencies/23';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/currencies/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the currency. Example: 23

Endpoints

Handle the incoming request.

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/events/1/register" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_event_id\": 44.9665819,
    \"organisation_event_session_id\": 1248
}"
const url = new URL(
    "http://api.memberz.test/api/events/1/register"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_event_id": 44.9665819,
    "organisation_event_session_id": 1248
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/1/register';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_event_id' => 44.9665819,
            'organisation_event_session_id' => 1248.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/events/{event_id}/register

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

event_id   integer   

The ID of the event. Example: 1

Body Parameters

organisation_event_id   number   

Example: 44.9665819

organisation_event_session_id   number   

Example: 1248

organisation_member_ids   object  optional  

This field is required when none of membership_uuids and member_ids are present.

membership_uuids   object  optional  

This field is required when none of organisation_member_ids and member_ids are present.

member_ids   object  optional  

This field is required when none of membership_uuids and organisation_member_ids are present.

Event Attendees

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_attendees/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_attendees/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_attendees/search?limit=3&page=1&sort=latest&fieldName=vitae" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "vitae",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'vitae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_attendees?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_attendees

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/event_attendees" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/event_attendees

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_attendees/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees/12';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/event_attendees/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 12

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/event_attendees/reprehenderit" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees/reprehenderit"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees/reprehenderit';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/event_attendees/{id}

PATCH api/event_attendees/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event attendee. Example: reprehenderit

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/event_attendees/pariatur" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_attendees/pariatur"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_attendees/pariatur';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/event_attendees/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event attendee. Example: pariatur

Event Calendars

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/calendars/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/calendars/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/calendars/search?limit=3&page=1&sort=latest&fieldName=tempora" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "tempora",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'tempora',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/calendars?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/calendars

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/calendars" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/calendars

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/calendars/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/calendars/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/calendars/est" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars/est"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars/est';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/calendars/{id}

PATCH api/calendars/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the calendar. Example: est

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/calendars/ut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/calendars/ut"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/calendars/ut';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/calendars/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the calendar. Example: ut

Event Reminder Broadcasts

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminder_broadcasts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_reminder_broadcasts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminder_broadcasts/search?limit=3&page=1&sort=latest&fieldName=nostrum" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "nostrum",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'nostrum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminder_broadcasts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_reminder_broadcasts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/event_reminder_broadcasts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/event_reminder_broadcasts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminder_broadcasts/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/event_reminder_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/event_reminder_broadcasts/saepe" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts/saepe"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts/saepe';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/event_reminder_broadcasts/{id}

PATCH api/event_reminder_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event reminder broadcast. Example: saepe

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/event_reminder_broadcasts/odit" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminder_broadcasts/odit"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminder_broadcasts/odit';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/event_reminder_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event reminder broadcast. Example: odit

Event Reminders

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminders/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_reminders/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminders/search?limit=3&page=1&sort=latest&fieldName=natus" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "natus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'natus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminders?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_reminders

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/event_reminders" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/event_reminders

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_reminders/20" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders/20"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders/20';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/event_reminders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 20

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/event_reminders/sint" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders/sint"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders/sint';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/event_reminders/{id}

PATCH api/event_reminders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event reminder. Example: sint

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/event_reminders/iure" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_reminders/iure"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_reminders/iure';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/event_reminders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event reminder. Example: iure

Event Sessions

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_sessions/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_sessions/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_sessions/search?limit=3&page=1&sort=latest&fieldName=rem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "rem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'rem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_sessions?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/event_sessions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/event_sessions

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/event_sessions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 405.7817,
    \"organisation_event_id\": 1810,
    \"name\": \"quia\",
    \"session_dt\": \"2024-11-07T17:01:41\",
    \"session_name\": \"ad\",
    \"registration_code\": \"repellat\"
}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 405.7817,
    "organisation_event_id": 1810,
    "name": "quia",
    "session_dt": "2024-11-07T17:01:41",
    "session_name": "ad",
    "registration_code": "repellat"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 405.7817,
            'organisation_event_id' => 1810.0,
            'name' => 'quia',
            'session_dt' => '2024-11-07T17:01:41',
            'session_name' => 'ad',
            'registration_code' => 'repellat',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/event_sessions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 405.7817

organisation_event_id   number   

Example: 1810

name   string   

Example: quia

session_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:41

session_name   string   

Example: ad

registration_code   string  optional  

Example: repellat

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/event_sessions/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/event_sessions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

PUT api/event_sessions/{id}

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/event_sessions/repudiandae" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 141.4,
    \"organisation_event_id\": 943249.8651,
    \"name\": \"voluptates\",
    \"session_dt\": \"2024-11-07T17:01:41\",
    \"session_name\": \"error\",
    \"registration_code\": \"eos\"
}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions/repudiandae"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 141.4,
    "organisation_event_id": 943249.8651,
    "name": "voluptates",
    "session_dt": "2024-11-07T17:01:41",
    "session_name": "error",
    "registration_code": "eos"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions/repudiandae';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 141.4,
            'organisation_event_id' => 943249.8651,
            'name' => 'voluptates',
            'session_dt' => '2024-11-07T17:01:41',
            'session_name' => 'error',
            'registration_code' => 'eos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/event_sessions/{id}

PATCH api/event_sessions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event session. Example: repudiandae

Body Parameters

organisation_id   number   

Example: 141.4

organisation_event_id   number   

Example: 943249.8651

name   string   

Example: voluptates

session_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:41

session_name   string   

Example: error

registration_code   string  optional  

Example: eos

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/event_sessions/voluptas" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/event_sessions/voluptas"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/event_sessions/voluptas';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/event_sessions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event session. Example: voluptas

Events

GET api/events/{event_id}/attendees

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events/1/attendees" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/1/attendees"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/1/attendees';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/events/{event_id}/attendees

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

event_id   integer   

The ID of the event. Example: 1

GET api/events/statistics

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events/statistics" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/statistics"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/events/statistics

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/events/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events/search?limit=3&page=1&sort=latest&fieldName=unde" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "unde",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'unde',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/events

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/events" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/events

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

GET api/events/{id}

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/events/possimus" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/possimus"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/possimus';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/events/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event. Example: possimus

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/events/culpa" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/culpa"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/culpa';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/events/{id}

PATCH api/events/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event. Example: culpa

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/events/libero" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/events/libero"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/events/libero';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/events/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the event. Example: libero

Expenditure - Account Balances

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_account_balances/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_account_balances/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_account_balances/search?limit=3&page=1&sort=latest&fieldName=ea" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "ea",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'ea',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_account_balances?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_account_balances

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/expense_account_balances

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/expense_account_balances" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 33766540,
    \"currency_id\": 223657.7,
    \"module_contribution_account_id\": 1906453.62376,
    \"balance\": 1946.688557,
    \"balance_dt\": \"2024-11-07T17:01:43\",
    \"member_account_id\": 1.1639258
}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 33766540,
    "currency_id": 223657.7,
    "module_contribution_account_id": 1906453.62376,
    "balance": 1946.688557,
    "balance_dt": "2024-11-07T17:01:43",
    "member_account_id": 1.1639258
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 33766540.0,
            'currency_id' => 223657.7,
            'module_contribution_account_id' => 1906453.62376,
            'balance' => 1946.688557,
            'balance_dt' => '2024-11-07T17:01:43',
            'member_account_id' => 1.1639258,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/expense_account_balances

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 33766540

currency_id   number   

Example: 223657.7

module_contribution_account_id   number   

Example: 1906453.62376

balance   number   

Example: 1946.688557

balance_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:43

member_account_id   number   

Example: 1.1639258

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_account_balances/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expense_account_balances/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

PUT api/expense_account_balances/{id}

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expense_account_balances/voluptatem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 256249372.00825346,
    \"currency_id\": 1.863997,
    \"module_contribution_account_id\": 1279.96781,
    \"balance\": 39.82,
    \"balance_dt\": \"2024-11-07T17:01:43\",
    \"member_account_id\": 145432563
}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances/voluptatem"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 256249372.00825346,
    "currency_id": 1.863997,
    "module_contribution_account_id": 1279.96781,
    "balance": 39.82,
    "balance_dt": "2024-11-07T17:01:43",
    "member_account_id": 145432563
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances/voluptatem';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 256249372.00825346,
            'currency_id' => 1.863997,
            'module_contribution_account_id' => 1279.96781,
            'balance' => 39.82,
            'balance_dt' => '2024-11-07T17:01:43',
            'member_account_id' => 145432563.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/expense_account_balances/{id}

PATCH api/expense_account_balances/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense account balance. Example: voluptatem

Body Parameters

organisation_id   number   

Example: 256249372.00825

currency_id   number   

Example: 1.863997

module_contribution_account_id   number   

Example: 1279.96781

balance   number   

Example: 39.82

balance_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:43

member_account_id   number   

Example: 145432563

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expense_account_balances/voluptate" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_account_balances/voluptate"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_account_balances/voluptate';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expense_account_balances/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense account balance. Example: voluptate

Expenditure - Accounts

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_accounts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_accounts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_accounts/search?limit=3&page=1&sort=latest&fieldName=eius" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "eius",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'eius',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_accounts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/expense_accounts

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/expense_accounts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 230674039.9845,
    \"currency_id\": 691966.82,
    \"name\": \"reiciendis\",
    \"description\": \"Voluptas nisi vitae voluptate magni neque dolore.\",
    \"account_type\": \"Savings\",
    \"bank_id\": 22.566201455,
    \"amount\": 3860.136234
}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 230674039.9845,
    "currency_id": 691966.82,
    "name": "reiciendis",
    "description": "Voluptas nisi vitae voluptate magni neque dolore.",
    "account_type": "Savings",
    "bank_id": 22.566201455,
    "amount": 3860.136234
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 230674039.9845,
            'currency_id' => 691966.82,
            'name' => 'reiciendis',
            'description' => 'Voluptas nisi vitae voluptate magni neque dolore.',
            'account_type' => 'Savings',
            'bank_id' => 22.566201455,
            'amount' => 3860.136234,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/expense_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 230674039.9845

currency_id   number   

Example: 691966.82

name   string   

Example: reiciendis

description   string  optional  

Example: Voluptas nisi vitae voluptate magni neque dolore.

account_type   string   

Example: Savings

Must be one of:
  • Cash
  • Current
  • Savings
  • Investment
bank_id   number   

Example: 22.566201455

amount   number  optional  

Example: 3860.136234

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_accounts/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expense_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

PUT api/expense_accounts/{id}

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expense_accounts/architecto" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 41758.5,
    \"currency_id\": 217.16575,
    \"name\": \"commodi\",
    \"description\": \"Est consequatur sed amet ut voluptas temporibus.\",
    \"account_type\": \"Current\",
    \"bank_id\": 78026077.8,
    \"amount\": 269041226
}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts/architecto"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 41758.5,
    "currency_id": 217.16575,
    "name": "commodi",
    "description": "Est consequatur sed amet ut voluptas temporibus.",
    "account_type": "Current",
    "bank_id": 78026077.8,
    "amount": 269041226
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts/architecto';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 41758.5,
            'currency_id' => 217.16575,
            'name' => 'commodi',
            'description' => 'Est consequatur sed amet ut voluptas temporibus.',
            'account_type' => 'Current',
            'bank_id' => 78026077.8,
            'amount' => 269041226.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/expense_accounts/{id}

PATCH api/expense_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense account. Example: architecto

Body Parameters

organisation_id   number   

Example: 41758.5

currency_id   number   

Example: 217.16575

name   string   

Example: commodi

description   string  optional  

Example: Est consequatur sed amet ut voluptas temporibus.

account_type   string   

Example: Current

Must be one of:
  • Cash
  • Current
  • Savings
  • Investment
bank_id   number   

Example: 78026077.8

amount   number  optional  

Example: 269041226

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expense_accounts/atque" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_accounts/atque"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_accounts/atque';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expense_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense account. Example: atque

Expenditure - Expense Request Items

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_request_items/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_request_items/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_request_items/search?limit=3&page=1&sort=latest&fieldName=ipsam" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "ipsam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'ipsam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_request_items?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_request_items

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Store a newly created resource in storage.

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/expense_request_items" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 54335.922088705,
    \"expense_request_id\": 63680.6423,
    \"currency_id\": 109661.9068513,
    \"quantity\": 491.46022,
    \"unit_price\": 14,
    \"total\": 89,
    \"description\": \"Veritatis quas quod eius soluta mollitia.\"
}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 54335.922088705,
    "expense_request_id": 63680.6423,
    "currency_id": 109661.9068513,
    "quantity": 491.46022,
    "unit_price": 14,
    "total": 89,
    "description": "Veritatis quas quod eius soluta mollitia."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 54335.922088705,
            'expense_request_id' => 63680.6423,
            'currency_id' => 109661.9068513,
            'quantity' => 491.46022,
            'unit_price' => 14,
            'total' => 89,
            'description' => 'Veritatis quas quod eius soluta mollitia.',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/expense_request_items

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 54335.922088705

expense_request_id   number  optional  

Example: 63680.6423

currency_id   number   

Example: 109661.9068513

quantity   number   

Example: 491.46022

unit_price   number   

Must be at least 1. Example: 14

total   number   

Must be at least 1. Example: 89

description   string  optional  

Example: Veritatis quas quod eius soluta mollitia.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_request_items/8" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items/8"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items/8';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expense_request_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 8

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expense_request_items/17" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items/17"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items/17';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/expense_request_items/{id}

PATCH api/expense_request_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the expense request item. Example: 17

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expense_request_items/minima" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_request_items/minima"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_request_items/minima';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expense_request_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense request item. Example: minima

Expenditure - Expense Requests

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_requests/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_requests/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_requests/search?limit=3&page=1&sort=latest&fieldName=et" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_requests?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_requests

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Store a newly created resource in storage.

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/expense_requests" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 60152.63784316,
    \"currency_id\": 1.1926645,
    \"requested_by_id\": 28043,
    \"approved_by_id\": 463492150.1095,
    \"voucher_no\": \"eum\",
    \"request_dt\": \"2024-11-07T17:01:43\",
    \"amount\": 15,
    \"approved_at\": \"2024-11-07T17:01:43\"
}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 60152.63784316,
    "currency_id": 1.1926645,
    "requested_by_id": 28043,
    "approved_by_id": 463492150.1095,
    "voucher_no": "eum",
    "request_dt": "2024-11-07T17:01:43",
    "amount": 15,
    "approved_at": "2024-11-07T17:01:43"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 60152.63784316,
            'currency_id' => 1.1926645,
            'requested_by_id' => 28043.0,
            'approved_by_id' => 463492150.1095,
            'voucher_no' => 'eum',
            'request_dt' => '2024-11-07T17:01:43',
            'amount' => 15,
            'approved_at' => '2024-11-07T17:01:43',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/expense_requests

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 60152.63784316

currency_id   number   

Example: 1.1926645

requested_by_id   number  optional  

Example: 28043

approved_by_id   number  optional  

Example: 463492150.1095

voucher_no   string  optional  

Example: eum

request_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:43

amount   number   

Must be at least 1. Example: 15

approved_at   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:43

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_requests/15" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests/15"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests/15';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expense_requests/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 15

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expense_requests/17" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 659.83,
    \"currency_id\": 301365132.49549985,
    \"requested_by_id\": 499320.874644,
    \"approved_by_id\": 36325.620245085,
    \"voucher_no\": \"fugiat\",
    \"request_dt\": \"2024-11-07T17:01:44\",
    \"amount\": 52,
    \"approved_at\": \"2024-11-07T17:01:44\"
}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests/17"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 659.83,
    "currency_id": 301365132.49549985,
    "requested_by_id": 499320.874644,
    "approved_by_id": 36325.620245085,
    "voucher_no": "fugiat",
    "request_dt": "2024-11-07T17:01:44",
    "amount": 52,
    "approved_at": "2024-11-07T17:01:44"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests/17';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 659.83,
            'currency_id' => 301365132.49549985,
            'requested_by_id' => 499320.874644,
            'approved_by_id' => 36325.620245085,
            'voucher_no' => 'fugiat',
            'request_dt' => '2024-11-07T17:01:44',
            'amount' => 52,
            'approved_at' => '2024-11-07T17:01:44',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/expense_requests/{id}

PATCH api/expense_requests/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the expense request. Example: 17

Body Parameters

organisation_id   number   

Example: 659.83

currency_id   number   

Example: 301365132.4955

requested_by_id   number  optional  

Example: 499320.874644

approved_by_id   number  optional  

Example: 36325.620245085

voucher_no   string  optional  

Example: fugiat

request_dt   string   

Must be a valid date. Example: 2024-11-07T17:01:44

amount   number   

Must be at least 1. Example: 52

approved_at   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:44

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expense_requests/laborum" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_requests/laborum"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_requests/laborum';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expense_requests/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense request. Example: laborum

Expenditure - Expense Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_types/search?limit=3&page=1&sort=latest&fieldName=doloremque" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "doloremque",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'doloremque',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expense_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/expense_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/expense_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expense_types/17" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types/17"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types/17';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expense_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 17

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expense_types/consequuntur" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types/consequuntur"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types/consequuntur';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/expense_types/{id}

PATCH api/expense_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense type. Example: consequuntur

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expense_types/voluptas" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expense_types/voluptas"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expense_types/voluptas';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expense_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense type. Example: voluptas

Expenditure - Expenses

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expenses/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expenses/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expenses/search?limit=3&page=1&sort=latest&fieldName=aut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "aut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'aut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expenses?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/expenses

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/expenses" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/expenses

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/expenses/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/expenses/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/expenses/ullam" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses/ullam"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses/ullam';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/expenses/{id}

PATCH api/expenses/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense. Example: ullam

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/expenses/cum" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/expenses/cum"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/expenses/cum';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/expenses/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the expense. Example: cum

Finance Reporting

Non Contributing Members Report

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/finance_reporting/non_contributing_members" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"year\": 298438.6
}"
const url = new URL(
    "http://api.memberz.test/api/finance_reporting/non_contributing_members"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "year": 298438.6
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/finance_reporting/non_contributing_members';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'year' => 298438.6,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/finance_reporting/non_contributing_members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

year   number   

Example: 298438.6

Income Summary Report

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/finance_reporting/income_summary" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"start_date\": \"2024-11-07T17:01:43\",
    \"end_date\": \"2024-11-07T17:01:43\",
    \"currency_id\": 5504398.879993
}"
const url = new URL(
    "http://api.memberz.test/api/finance_reporting/income_summary"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "start_date": "2024-11-07T17:01:43",
    "end_date": "2024-11-07T17:01:43",
    "currency_id": 5504398.879993
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/finance_reporting/income_summary';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'start_date' => '2024-11-07T17:01:43',
            'end_date' => '2024-11-07T17:01:43',
            'currency_id' => 5504398.879993,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/finance_reporting/income_summary

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

start_date   string   

Must be a valid date. Example: 2024-11-07T17:01:43

end_date   string   

Must be a valid date. Example: 2024-11-07T17:01:43

currency_id   number   

Example: 5504398.879993

Top Contributors

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/finance_reporting/top_contributors" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"year\": 20242873.874714073,
    \"currency_id\": 8923988.49374
}"
const url = new URL(
    "http://api.memberz.test/api/finance_reporting/top_contributors"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "year": 20242873.874714073,
    "currency_id": 8923988.49374
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/finance_reporting/top_contributors';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'year' => 20242873.874714073,
            'currency_id' => 8923988.49374,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/finance_reporting/top_contributors

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

year   number   

Example: 20242873.874714

currency_id   number   

Example: 8923988.49374

Monthly Consolidated Report

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/finance_reporting/monthly_consolidated_report" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"year\": 7179272.9723,
    \"currency_id\": 3736.1
}"
const url = new URL(
    "http://api.memberz.test/api/finance_reporting/monthly_consolidated_report"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "year": 7179272.9723,
    "currency_id": 3736.1
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/finance_reporting/monthly_consolidated_report';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'year' => 7179272.9723,
            'currency_id' => 3736.1,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/finance_reporting/monthly_consolidated_report

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

year   number   

Example: 7179272.9723

currency_id   number   

Example: 3736.1

Top Contributors

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/finance_reporting/contributors_by_type" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"year\": 24487.1,
    \"start_date\": \"2024-11-07T17:01:43\",
    \"end_date\": \"2024-11-07T17:01:43\",
    \"currency_id\": 6.5261,
    \"contribution_type_id\": 22268.97631
}"
const url = new URL(
    "http://api.memberz.test/api/finance_reporting/contributors_by_type"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "year": 24487.1,
    "start_date": "2024-11-07T17:01:43",
    "end_date": "2024-11-07T17:01:43",
    "currency_id": 6.5261,
    "contribution_type_id": 22268.97631
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/finance_reporting/contributors_by_type';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'year' => 24487.1,
            'start_date' => '2024-11-07T17:01:43',
            'end_date' => '2024-11-07T17:01:43',
            'currency_id' => 6.5261,
            'contribution_type_id' => 22268.97631,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/finance_reporting/contributors_by_type

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

year   number  optional  

Example: 24487.1

start_date   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:43

end_date   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:43

currency_id   number   

Example: 6.5261

contribution_type_id   number   

Example: 22268.97631

Member Accounts

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisations/21/member_accounts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/member_accounts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/member_accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisations/{org_slug}/member_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Get Organisations

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_accounts/1/organisations" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/1/organisations"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/1/organisations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{"error" => "Member Account Not Found"}
 

Request      

GET api/member_accounts/{id}/organisations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer  optional  

ID of member account. Example: 1

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_accounts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_accounts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_accounts/search?limit=3&page=1&sort=latest&fieldName=dolor" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "dolor",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'dolor',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_accounts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/member_accounts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/member_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_accounts/4" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/4"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/4';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/member_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 4

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/member_accounts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/member_accounts/{id}

PATCH api/member_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member account. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/member_accounts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_accounts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_accounts/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/member_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member account. Example: 1

Member Category Settings

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_category_settings/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisation_member_category_settings/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_category_settings/search?limit=3&page=1&sort=latest&fieldName=quidem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quidem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quidem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_category_settings?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisation_member_category_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/organisation_member_category_settings

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_member_category_settings" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 48090.228,
    \"organisation_member_category_id\": 4156073.5845101136,
    \"member_category_setting_id\": 1,
    \"value\": \"debitis\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 48090.228,
    "organisation_member_category_id": 4156073.5845101136,
    "member_category_setting_id": 1,
    "value": "debitis"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 48090.228,
            'organisation_member_category_id' => 4156073.5845101136,
            'member_category_setting_id' => 1.0,
            'value' => 'debitis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

POST api/organisation_member_category_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 48090.228

organisation_member_category_id   number   

Example: 4156073.5845101

member_category_setting_id   number   

Example: 1

value   string   

Example: debitis

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_category_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisation_member_category_settings/{setting}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

setting   integer   

Example: 1

id   integer   

The id of the resource to view Example: 10

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

PUT api/organisation_member_category_settings/{setting}

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_member_category_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 432.32184,
    \"organisation_member_category_id\": 13559538.995894,
    \"member_category_setting_id\": 2.3863,
    \"value\": \"nobis\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 432.32184,
    "organisation_member_category_id": 13559538.995894,
    "member_category_setting_id": 2.3863,
    "value": "nobis"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 432.32184,
            'organisation_member_category_id' => 13559538.995894,
            'member_category_setting_id' => 2.3863,
            'value' => 'nobis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Cannot call constructor",
    "exception": "Error",
    "file": "D:\\memberz-api\\app\\Http\\Controllers\\OrganisationMemberCategorySettingController.php",
    "line": 22,
    "trace": [
        {
            "function": "__construct",
            "class": "App\\Http\\Controllers\\OrganisationMemberCategorySettingController",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 944,
            "function": "newInstanceArgs",
            "class": "ReflectionClass",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 787,
            "function": "build",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1034,
            "function": "resolve",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 723,
            "function": "resolve",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
            "line": 1019,
            "function": "make",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 279,
            "function": "make",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1105,
            "function": "getController",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php",
            "line": 1036,
            "function": "controllerMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 818,
            "function": "gatherMiddleware",
            "class": "Illuminate\\Routing\\Route",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 800,
            "function": "gatherRouteMiddleware",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

PUT api/organisation_member_category_settings/{setting}

PATCH api/organisation_member_category_settings/{setting}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

setting   integer   

Example: 1

Body Parameters

organisation_id   number   

Example: 432.32184

organisation_member_category_id   number   

Example: 13559538.995894

member_category_setting_id   number   

Example: 2.3863

value   string   

Example: nobis

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_member_category_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_category_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_category_settings/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_member_category_settings/{setting}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

setting   integer   

Example: 1

Member Images

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_images/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_images/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_images/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_images/search?limit=3&page=1&sort=latest&fieldName=iusto" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_images/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "iusto",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'iusto',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_images?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_images"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_images

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/member_images

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/member_images" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --form "member_id=0"\
    --form "image_base64=quia"\
    --form "image=@C:\Users\icewa\AppData\Local\Temp\php3B83.tmp" 
const url = new URL(
    "http://api.memberz.test/api/member_images"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

const body = new FormData();
body.append('member_id', '0');
body.append('image_base64', 'quia');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'multipart' => [
            [
                'name' => 'member_id',
                'contents' => '0'
            ],
            [
                'name' => 'image_base64',
                'contents' => 'quia'
            ],
            [
                'name' => 'image',
                'contents' => fopen('C:\Users\icewa\AppData\Local\Temp\php3B83.tmp', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/member_images

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

member_id   number   

Example: 0

image   file   

Must be a file. Must not be greater than 5000 kilobytes. Example: C:\Users\icewa\AppData\Local\Temp\php3B83.tmp

image_base64   string   

Example: quia

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_images/17" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_images/17"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images/17';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/member_images/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 17

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

PUT api/member_images/{id}

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/member_images/215" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --form "member_id=4930.93189"\
    --form "image_base64=totam"\
    --form "image=@C:\Users\icewa\AppData\Local\Temp\php3BB4.tmp" 
const url = new URL(
    "http://api.memberz.test/api/member_images/215"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

const body = new FormData();
body.append('member_id', '4930.93189');
body.append('image_base64', 'totam');
body.append('image', document.querySelector('input[name="image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images/215';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'multipart' => [
            [
                'name' => 'member_id',
                'contents' => '4930.93189'
            ],
            [
                'name' => 'image_base64',
                'contents' => 'totam'
            ],
            [
                'name' => 'image',
                'contents' => fopen('C:\Users\icewa\AppData\Local\Temp\php3BB4.tmp', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/member_images/{id}

PATCH api/member_images/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member image. Example: 215

Body Parameters

member_id   number   

Example: 4930.93189

image   file   

Must be a file. Must not be greater than 5000 kilobytes. Example: C:\Users\icewa\AppData\Local\Temp\php3BB4.tmp

image_base64   string   

Example: totam

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/member_images/215" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_images/215"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_images/215';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/member_images/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member image. Example: 215

Member Profiles

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisations/21/members" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/members"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/members';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisations/{org_slug}/members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Membership Organisations

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/1/organisations" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1/organisations"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1/organisations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{"error" => "Profile Not Found"}
 

Request      

GET api/members/{id}/organisations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer  optional  

ID of profile. Example: 1

Member Memberships

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/1/memberships" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1/memberships"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1/memberships';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{"error" => "Profile Not Found"}
 

Request      

GET api/members/{id}/memberships

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer  optional  

ID of profile. Example: 1

GET api/members/{id}/upcoming-events

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/1/upcoming-events" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1/upcoming-events"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1/upcoming-events';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/members/{id}/upcoming-events

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member. Example: 1

GET api/members/{id}/past-events

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/1/past-events" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1/past-events"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1/past-events';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/members/{id}/past-events

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member. Example: 1

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/members/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/search?limit=3&page=1&sort=latest&fieldName=voluptates" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "voluptates",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'voluptates',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/members" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/members/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/2';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 2

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/members/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/members/{id}

PATCH api/members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/members/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/members/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/members/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member. Example: 1

Member Relation Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relation_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_relation_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relation_types/search?limit=3&page=1&sort=latest&fieldName=eveniet" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "eveniet",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'eveniet',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relation_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_relation_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/member_relation_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/member_relation_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relation_types/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/member_relation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/member_relation_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/member_relation_types/{id}

PATCH api/member_relation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member relation type. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/member_relation_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relation_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relation_types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/member_relation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member relation type. Example: 1

Member Relations

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relations/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relations/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_relations/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relations/search?limit=3&page=1&sort=latest&fieldName=quod" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relations/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quod",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quod',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relations?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relations"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/member_relations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Member Relation

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/member_relations" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"member_id\": 1,
    \"name\": \"Joseph Ansah\",
    \"gender\": \"Male\",
    \"dob\": \"1990-01-04\",
    \"is_alive\": true,
    \"active\": true,
    \"member_relation_type_id\": 1,
    \"relation_member_id\": 1
}"
const url = new URL(
    "http://api.memberz.test/api/member_relations"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "member_id": 1,
    "name": "Joseph Ansah",
    "gender": "Male",
    "dob": "1990-01-04",
    "is_alive": true,
    "active": true,
    "member_relation_type_id": 1,
    "relation_member_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'member_id' => 1.0,
            'name' => 'Joseph Ansah',
            'gender' => 'Male',
            'dob' => '1990-01-04',
            'is_alive' => true,
            'active' => true,
            'member_relation_type_id' => 1.0,
            'relation_member_id' => 1.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "member_id": 1,
        "name": "Isaac Aubin",
        "gender": "male",
        "dob": null,
        "is_alive": 1,
        "relation_member_id": null,
        "member_relation_type_id": 2,
        "active": true,
        "created_at": "2022-06-18T15:26:54.000000Z",
        "updated_at": "2022-06-18T15:26:54.000000Z",
        "relative": null,
        "member_relation_type": {
            "id": 2,
            "name": "Parent",
            "created_at": null,
            "updated_at": null
        }
    }
}
 

Request      

POST api/member_relations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

member_id   number   

Id of member. Example: 1

name   string   

Name of member relation. Example: Joseph Ansah

gender   string   

Gender of member relation. Example: Male

dob   string   

Date of birth of member relation. Example: 1990-01-04

is_alive   boolean  optional  

Member relation alive or dead. Example: true

active   boolean  optional  

Member relation active or inactive. Example: true

member_relation_type_id   number   

Id of member relation type. Example: 1

relation_member_id   number  optional  

Linked to member id of members table. Example: 1

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/member_relations/17" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relations/17"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations/17';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/member_relations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 17

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Member Relation

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/member_relations/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"member_id\": 1,
    \"name\": \"Joseph Ansah\",
    \"gender\": \"Male\",
    \"dob\": \"1990-01-04\",
    \"is_alive\": true,
    \"active\": true,
    \"member_relation_type_id\": 1,
    \"relation_member_id\": 1
}"
const url = new URL(
    "http://api.memberz.test/api/member_relations/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "member_id": 1,
    "name": "Joseph Ansah",
    "gender": "Male",
    "dob": "1990-01-04",
    "is_alive": true,
    "active": true,
    "member_relation_type_id": 1,
    "relation_member_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'member_id' => 1.0,
            'name' => 'Joseph Ansah',
            'gender' => 'Male',
            'dob' => '1990-01-04',
            'is_alive' => true,
            'active' => true,
            'member_relation_type_id' => 1.0,
            'relation_member_id' => 1.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "member_id": 1,
        "name": "Isaac Aubin",
        "gender": "male",
        "dob": null,
        "is_alive": 1,
        "relation_member_id": null,
        "member_relation_type_id": 2,
        "active": true,
        "created_at": "2022-06-18T15:26:54.000000Z",
        "updated_at": "2022-06-18T15:26:54.000000Z",
        "relative": null,
        "member_relation_type": {
            "id": 2,
            "name": "Parent",
            "created_at": null,
            "updated_at": null
        }
    }
}
 

Request      

PUT api/member_relations/{id}

PATCH api/member_relations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member relation. Example: 1

Body Parameters

member_id   number   

Id of member. Example: 1

name   string   

Name of member relation. Example: Joseph Ansah

gender   string   

Gender of member relation. Example: Male

dob   string   

Date of birth of member relation. Example: 1990-01-04

is_alive   boolean  optional  

Member relation alive or dead. Example: true

active   boolean  optional  

Member relation active or inactive. Example: true

member_relation_type_id   number   

Id of member relation type. Example: 1

relation_member_id   number  optional  

Linked to member id of members table. Example: 1

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/member_relations/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/member_relations/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/member_relations/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/member_relations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the member relation. Example: 1

Membership Registration

Get Organisation By Slug

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Organisation not found"
}
 

Request      

GET api/organisations/{org_slug}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Get Registration Form By Slug

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/organisation_registration_forms/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/organisation_registration_forms/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/organisation_registration_forms/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/organisation_registration_forms/{slug}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

slug   integer   

The slug of the organisation registration form. Example: 1

Registration Form Registrants

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/organisation_members/711" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/organisation_members/711"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/organisation_members/711';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/organisation_members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

id   integer   

The ID of the organisation member. Example: 711

Registration Form Registrants

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/memberships/ut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/memberships/ut"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/memberships/ut';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/memberships/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

id   string   

The ID of the membership. Example: ut

Notifications

Mark As Read

requires authentication

Mark a specific notification as read

Example request:
curl --request POST \
    "http://api.memberz.test/api/notifications/nihil/mark_read" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/notifications/nihil/mark_read"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/notifications/nihil/mark_read';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/notifications/{id}/mark_read

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the notification. Example: nihil

Mark All Read

requires authentication

Mark all unread notifications as read

Example request:
curl --request POST \
    "http://api.memberz.test/api/notifications/mark_all_read" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/notifications/mark_all_read"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/notifications/mark_all_read';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/notifications/mark_all_read

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Get Unread

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/notifications/unread" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/notifications/unread"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/notifications/unread';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/notifications/unread

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/notifications?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/notifications"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/notifications';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/notifications

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Subscribe To Notifications

requires authentication

Subscribe to Server Sent Events (SSEs) for real time notification of new notification messages that come through for the logged in user

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/notifications/subscribe/aliquid" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/notifications/subscribe/aliquid"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/notifications/subscribe/aliquid';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
access-control-allow-origin: 
access-control-expose-headers: *
access-control-allow-credentials: true
content-type: text/event-stream; charset=UTF-8
x-accel-buffering: no
cache-control: no-cache, private
 


 

Request      

GET api/notifications/subscribe/{member_id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

member_id   string   

The ID of the member. Example: aliquid

Organisation

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_registration_forms/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_registration_forms/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_registration_forms/search?limit=3&page=1&sort=latest&fieldName=doloremque" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "doloremque",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'doloremque',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_registration_forms?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_registration_forms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Send Message

requires authentication

Adds a message to the queue to dispatch to the phone number

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_registration_forms" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 64.14158,
    \"organisation_member_category_id\": 21518.0135379,
    \"name\": \"illo\",
    \"description\": \"Quam adipisci quas sit autem.\",
    \"expiration_dt\": \"2024-11-07T17:01:40\",
    \"excluded_standard_fields\": \"quos\",
    \"custom_fields\": \"[\\\"ut\\\",\\\"hic\\\"]\",
    \"form_enabled\": true,
    \"deleted_at\": \"2024-11-07T17:01:40\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 64.14158,
    "organisation_member_category_id": 21518.0135379,
    "name": "illo",
    "description": "Quam adipisci quas sit autem.",
    "expiration_dt": "2024-11-07T17:01:40",
    "excluded_standard_fields": "quos",
    "custom_fields": "[\"ut\",\"hic\"]",
    "form_enabled": true,
    "deleted_at": "2024-11-07T17:01:40"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 64.14158,
            'organisation_member_category_id' => 21518.0135379,
            'name' => 'illo',
            'description' => 'Quam adipisci quas sit autem.',
            'expiration_dt' => '2024-11-07T17:01:40',
            'excluded_standard_fields' => 'quos',
            'custom_fields' => '["ut","hic"]',
            'form_enabled' => true,
            'deleted_at' => '2024-11-07T17:01:40',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_registration_forms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 64.14158

organisation_member_category_id   number   

Example: 21518.0135379

name   string   

Example: illo

description   string  optional  

Example: Quam adipisci quas sit autem.

expiration_dt   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:40

excluded_standard_fields   string  optional  

Example: quos

custom_fields   string  optional  

Must be a valid JSON string. Example: ["ut","hic"]

form_enabled   boolean  optional  

Example: true

deleted_at   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:40

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_registration_forms/15" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms/15"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms/15';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_registration_forms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 15

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_registration_forms/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_registration_forms/{id}

PATCH api/organisation_registration_forms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation registration form. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_registration_forms/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_registration_forms/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_registration_forms/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_registration_forms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation registration form. Example: 1

Organisation Accounts

Get User Specific Account

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_accounts/12/quidem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/12/quidem"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/12/quidem';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_accounts/{organisation_id}/{member_account_id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

organisation_id   integer   

The ID of the organisation. Example: 12

member_account_id   string   

The ID of the member account. Example: quidem

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_accounts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_accounts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_accounts/search?limit=3&page=1&sort=latest&fieldName=qui" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'qui',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_accounts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Account

requires authentication

NOTE: If the MemberAccount does not exist for this organisation account being created, one will be created in the prepareValidation method of the OrganisationAccountRequest object and the member_account_id updated before it is saved to the database

User will receive a notification via email to reset their password

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_accounts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 216944.315555014,
    \"member_id\": 2117771.6503170417,
    \"member_account_id\": 347609.40738753,
    \"organisation_role_id\": 1751999.33380405
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 216944.315555014,
    "member_id": 2117771.6503170417,
    "member_account_id": 347609.40738753,
    "organisation_role_id": 1751999.33380405
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 216944.315555014,
            'member_id' => 2117771.6503170417,
            'member_account_id' => 347609.40738753,
            'organisation_role_id' => 1751999.33380405,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 216944.31555501

member_id   number  optional  

This field is required when member_account_id is not present. Example: 2117771.650317

member_account_id   number  optional  

This field is required when member_id is not present. Example: 347609.40738753

organisation_role_id   number   

Example: 1751999.333804

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_accounts/16" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/16"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 16

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Account

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_accounts/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 0.6,
    \"member_id\": 30.04603641,
    \"member_account_id\": 427.7603514,
    \"organisation_role_id\": 559.5
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 0.6,
    "member_id": 30.04603641,
    "member_account_id": 427.7603514,
    "organisation_role_id": 559.5
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/12';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 0.6,
            'member_id' => 30.04603641,
            'member_account_id' => 427.7603514,
            'organisation_role_id' => 559.5,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisation_accounts/{id}

PATCH api/organisation_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation account. Example: 12

Body Parameters

organisation_id   number   

Example: 0.6

member_id   number  optional  

This field is required when member_account_id is not present. Example: 30.04603641

member_account_id   number  optional  

This field is required when member_id is not present. Example: 427.7603514

organisation_role_id   number   

Example: 559.5

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_accounts/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_accounts/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_accounts/12';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation account. Example: 12

Organisation Anniversary

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_anniversaries/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_anniversaries/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_anniversaries/search?limit=3&page=1&sort=latest&fieldName=laboriosam" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "laboriosam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'laboriosam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_anniversaries?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_anniversaries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_anniversaries" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_anniversaries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_anniversaries/15" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries/15"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries/15';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 15

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_anniversaries/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_anniversaries/{id}

PATCH api/organisation_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation anniversary. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_anniversaries/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_anniversaries/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_anniversaries/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation anniversary. Example: 1

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_anniversaries/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_anniversaries/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_anniversaries/search?limit=3&page=1&sort=latest&fieldName=vel" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "vel",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'vel',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_anniversaries?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_anniversaries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_member_anniversaries" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_member_anniversaries

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_anniversaries/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_member_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_member_anniversaries/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_member_anniversaries/{id}

PATCH api/organisation_member_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member anniversary. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_member_anniversaries/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_anniversaries/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_anniversaries/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_member_anniversaries/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member anniversary. Example: 1

Organisation Branches

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_branches/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_branches/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_branches/search?limit=3&page=1&sort=latest&fieldName=tempora" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "tempora",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'tempora',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_branches?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_branches

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Branch

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_branches" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"branch_organisation_id\": 2,
    \"primary_member_id\": 1234,
    \"secondary_member_id\": 1444
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "branch_organisation_id": 2,
    "primary_member_id": 1234,
    "secondary_member_id": 1444
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'branch_organisation_id' => 2.0,
            'primary_member_id' => 1234.0,
            'secondary_member_id' => 1444.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_branches

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

The parent organisation of this relationship. Example: 1

branch_organisation_id   number   

The branch organisation of this relationship. Example: 2

primary_member_id   number  optional  

The primary contact person in this organisation. Example: 1234

secondary_member_id   number  optional  

The secondary contact person in this organisation. Example: 1444

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_branches/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_branches/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Branch

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_branches/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"branch_organisation_id\": 2,
    \"primary_member_id\": 1234,
    \"secondary_member_id\": 1444
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "branch_organisation_id": 2,
    "primary_member_id": 1234,
    "secondary_member_id": 1444
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'branch_organisation_id' => 2.0,
            'primary_member_id' => 1234.0,
            'secondary_member_id' => 1444.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisation_branches/{id}

PATCH api/organisation_branches/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation branch. Example: 1

Body Parameters

organisation_id   number   

The parent organisation of this relationship. Example: 1

branch_organisation_id   number   

The branch organisation of this relationship. Example: 2

primary_member_id   number  optional  

The primary contact person in this organisation. Example: 1234

secondary_member_id   number  optional  

The secondary contact person in this organisation. Example: 1444

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_branches/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_branches/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_branches/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_branches/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation branch. Example: 1

Organisation File Imports

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_file_imports/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_file_imports/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_file_imports/search?limit=3&page=1&sort=latest&fieldName=et" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "et",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'et',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_file_imports?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_file_imports

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Import File

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_file_imports" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --form "organisation_id=75"\
    --form "import_to_id=7766.63"\
    --form "import_type=contributions"\
    --form "import_file=@C:\Users\icewa\AppData\Local\Temp\php41B1.tmp" 
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

const body = new FormData();
body.append('organisation_id', '75');
body.append('import_to_id', '7766.63');
body.append('import_type', 'contributions');
body.append('import_file', document.querySelector('input[name="import_file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'multipart' => [
            [
                'name' => 'organisation_id',
                'contents' => '75'
            ],
            [
                'name' => 'import_to_id',
                'contents' => '7766.63'
            ],
            [
                'name' => 'import_type',
                'contents' => 'contributions'
            ],
            [
                'name' => 'import_file',
                'contents' => fopen('C:\Users\icewa\AppData\Local\Temp\php41B1.tmp', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_file_imports

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 75

import_to_id   number   

Example: 7766.63

import_type   string   

Example: contributions

Must be one of:
  • members
  • contributions
import_file   file   

Must be a file. Example: C:\Users\icewa\AppData\Local\Temp\php41B1.tmp

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_file_imports/7" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports/7"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports/7';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_file_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 7

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Import

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_file_imports/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisation_file_imports/{id}

PATCH api/organisation_file_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation file import. Example: 1

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_file_imports/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_file_imports/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_file_imports/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_file_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation file import. Example: 1

Organisation Group Leaders

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_leaders/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_group_leaders/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_leaders/search?limit=3&page=1&sort=latest&fieldName=molestiae" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "molestiae",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'molestiae',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_leaders?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_group_leaders

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_group_leaders" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_group_leaders

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_leaders/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders/11';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_group_leaders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 11

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_group_leaders/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_group_leaders/{id}

PATCH api/organisation_group_leaders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group leader. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_group_leaders/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_leaders/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_leaders/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_group_leaders/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group leader. Example: 1

Organisation Group Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_group_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_types/search?limit=3&page=1&sort=latest&fieldName=fuga" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "fuga",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'fuga',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_group_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_group_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_group_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_group_types/4" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types/4"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types/4';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_group_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 4

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_group_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_group_types/{id}

PATCH api/organisation_group_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group type. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_group_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_group_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_group_types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_group_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group type. Example: 1

Organisation Groups

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_groups/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_groups/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_groups/search?limit=3&page=1&sort=latest&fieldName=quidem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quidem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quidem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_groups?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_groups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Group

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_groups" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"organisation_group_type_id\": 1,
    \"name\": \"Default\",
    \"active\": 1,
    \"organisation_group_leaders\": [
        {
            \"id\": 1,
            \"name\": \"James Ans\",
            \"role\": \"President\",
            \"organisation_member_id\": 1
        }
    ]
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "organisation_group_type_id": 1,
    "name": "Default",
    "active": 1,
    "organisation_group_leaders": [
        {
            "id": 1,
            "name": "James Ans",
            "role": "President",
            "organisation_member_id": 1
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'organisation_group_type_id' => 1.0,
            'name' => 'Default',
            'active' => 1,
            'organisation_group_leaders' => [
                [
                    'id' => 1.0,
                    'name' => 'James Ans',
                    'role' => 'President',
                    'organisation_member_id' => 1.0,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_groups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

The organisation of this group record. Example: 1

organisation_group_type_id   number   

The group type of this group record. Example: 1

name   string   

The name of this group record. Example: Default

active   string  optional  

The active state of this group record. Example: 1

organisation_group_leaders   object[]  optional  
id   number  optional  

The ID of a leader of this group. Example: 1

name   string  optional  

The name of a leader of this group. Example: James Ans

role   string  optional  

The role of a leader of this group. Example: President

organisation_member_id   number  optional  

The membership ID of a leader of this group. Example: 1

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_groups/13" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups/13"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups/13';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 13

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Group

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_groups/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"organisation_group_type_id\": 1,
    \"name\": \"Default\",
    \"active\": 1,
    \"organisation_group_leaders\": [
        {
            \"id\": 1,
            \"name\": \"James Ans\",
            \"role\": \"President\",
            \"organisation_member_id\": 1
        }
    ]
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "organisation_group_type_id": 1,
    "name": "Default",
    "active": 1,
    "organisation_group_leaders": [
        {
            "id": 1,
            "name": "James Ans",
            "role": "President",
            "organisation_member_id": 1
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'organisation_group_type_id' => 1.0,
            'name' => 'Default',
            'active' => 1,
            'organisation_group_leaders' => [
                [
                    'id' => 1.0,
                    'name' => 'James Ans',
                    'role' => 'President',
                    'organisation_member_id' => 1.0,
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisation_groups/{id}

PATCH api/organisation_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group. Example: 1

Body Parameters

organisation_id   number   

The organisation of this group record. Example: 1

organisation_group_type_id   number   

The group type of this group record. Example: 1

name   string   

The name of this group record. Example: Default

active   string  optional  

The active state of this group record. Example: 1

organisation_group_leaders   object[]  optional  
id   number  optional  

The ID of a leader of this group. Example: 1

name   string  optional  

The name of a leader of this group. Example: James Ans

role   string  optional  

The role of a leader of this group. Example: President

organisation_member_id   number  optional  

The membership ID of a leader of this group. Example: 1

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_groups/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_groups/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_groups/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation group. Example: 1

Organisation Invoice Items

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_items/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoice_items/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_items/search?limit=3&page=1&sort=latest&fieldName=quo" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quo",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_items?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoice_items

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_invoice_items" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_invoice_items

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_items/7" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items/7"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items/7';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_invoice_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 7

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_invoice_items/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_invoice_items/{id}

PATCH api/organisation_invoice_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice item. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_invoice_items/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_items/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_items/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_invoice_items/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice item. Example: 1

Organisation Invoice Payments

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_payments/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoice_payments/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_payments/search?limit=3&page=1&sort=latest&fieldName=quo" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quo",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quo',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_payments?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoice_payments

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_invoice_payments" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_invoice_payments

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoice_payments/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_invoice_payments/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_invoice_payments/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_invoice_payments/{id}

PATCH api/organisation_invoice_payments/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice payment. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_invoice_payments/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoice_payments/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoice_payments/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_invoice_payments/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice payment. Example: 1

Organisation Invoices

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoices/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoices/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoices/search?limit=3&page=1&sort=latest&fieldName=pariatur" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "pariatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'pariatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoices?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_invoices

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_invoices" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_invoices

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_invoices/10" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices/10"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices/10';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_invoices/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 10

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_invoices/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices/2';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_invoices/{id}

PATCH api/organisation_invoices/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice. Example: 2

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_invoices/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_invoices/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_invoices/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_invoices/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation invoice. Example: 2

Organisation Member Categories

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/membership_categories?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/membership_categories"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/membership_categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/membership_categories

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_categories/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_categories/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_categories/search?limit=3&page=1&sort=latest&fieldName=ea" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "ea",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'ea',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_categories?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_categories

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Group

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_member_categories" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_member_categories

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_categories/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_member_categories/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Group

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_member_categories/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisation_member_categories/{id}

PATCH api/organisation_member_categories/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member category. Example: 1

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_member_categories/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_categories/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_categories/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_member_categories/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member category. Example: 1

Organisation Member Groups

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_groups/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_groups/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_groups/search?limit=3&page=1&sort=latest&fieldName=harum" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "harum",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'harum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_groups?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_groups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Association

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_member_groups" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"organisation_member_id\": 1,
    \"organisation_group_id\": 1
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "organisation_member_id": 1,
    "organisation_group_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'organisation_member_id' => 1.0,
            'organisation_group_id' => 1.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 44,
        "organisation_member_id": 856,
        "organisation_group_id": 2,
        "created": "2014-04-29T12:48:16.000000Z",
        "modified": "2014-04-29T12:48:16.000000Z",
        "active": true,
        "organisation_member": {
            "id": 856,
            "uuid": "2f558244-6f12-4db0-ac92-7df1c01a6e66",
            "organisation_id": 44,
            "member_id": 1,
            "organisation_no": "",
            "organisation_member_category_id": 13,
            "organisation_registration_form_id": null,
            "status": "member",
            "source": "admin",
            "membership_start_dt": null,
            "membership_end_dt": null,
            "last_renewal_dt": null,
            "created": "2014-04-29T00:38:35.000000Z",
            "modified": "2014-04-29T00:38:35.000000Z",
            "approved": 1,
            "approved_by": 52,
            "custom_attributes": null,
            "active": true
        },
        "organisation_group": {
            "id": 2,
            "organisation_id": 44,
            "organisation_group_type_id": 1,
            "name": "Youth Ministry",
            "organisation_member_group_count": 273,
            "created": "2014-04-08T13:57:41.000000Z",
            "modified": "2022-03-07T17:07:41.000000Z",
            "active": true,
            "organisation_group_type": {
                "id": 1,
                "organisation_id": 44,
                "name": "Auxiliary",
                "description": "",
                "show_on_reg_forms": 1,
                "allow_multi_select": 0,
                "created": "-000001-11-30T00:00:00.000000Z",
                "modified": "2016-07-12T18:24:59.000000Z",
                "active": true
            }
        }
    }
}
 

Request      

POST api/organisation_member_groups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Organisation this record belongs to. Example: 1

organisation_member_id   number   

Membership this record belongs to. Example: 1

organisation_group_id   number   

Group this record belongs to. Example: 1

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_groups/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_member_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Association

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_member_groups/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 1,
    \"organisation_member_id\": 1,
    \"organisation_group_id\": 1
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 1,
    "organisation_member_id": 1,
    "organisation_group_id": 1
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 1.0,
            'organisation_member_id' => 1.0,
            'organisation_group_id' => 1.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 44,
        "organisation_member_id": 856,
        "organisation_group_id": 2,
        "created": "2014-04-29T12:48:16.000000Z",
        "modified": "2014-04-29T12:48:16.000000Z",
        "active": true,
        "organisation_member": {
            "id": 856,
            "uuid": "2f558244-6f12-4db0-ac92-7df1c01a6e66",
            "organisation_id": 44,
            "member_id": 1,
            "organisation_no": "",
            "organisation_member_category_id": 13,
            "organisation_registration_form_id": null,
            "status": "member",
            "source": "admin",
            "membership_start_dt": null,
            "membership_end_dt": null,
            "last_renewal_dt": null,
            "created": "2014-04-29T00:38:35.000000Z",
            "modified": "2014-04-29T00:38:35.000000Z",
            "approved": 1,
            "approved_by": 52,
            "custom_attributes": null,
            "active": true
        },
        "organisation_group": {
            "id": 2,
            "organisation_id": 44,
            "organisation_group_type_id": 1,
            "name": "Youth Ministry",
            "organisation_member_group_count": 273,
            "created": "2014-04-08T13:57:41.000000Z",
            "modified": "2022-03-07T17:07:41.000000Z",
            "active": true,
            "organisation_group_type": {
                "id": 1,
                "organisation_id": 44,
                "name": "Auxiliary",
                "description": "",
                "show_on_reg_forms": 1,
                "allow_multi_select": 0,
                "created": "-000001-11-30T00:00:00.000000Z",
                "modified": "2016-07-12T18:24:59.000000Z",
                "active": true
            }
        }
    }
}
 

Request      

PUT api/organisation_member_groups/{id}

PATCH api/organisation_member_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member group. Example: 1

Body Parameters

organisation_id   number   

Organisation this record belongs to. Example: 1

organisation_member_id   number   

Membership this record belongs to. Example: 1

organisation_group_id   number   

Group this record belongs to. Example: 1

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_member_groups/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_groups/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_groups/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_member_groups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member group. Example: 1

Organisation Member Imports

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_imports/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_imports/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_imports/search?limit=3&page=1&sort=latest&fieldName=consequatur" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "consequatur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'consequatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_imports?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_member_imports

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_member_imports" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_member_imports

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_member_imports/9" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports/9"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports/9';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_member_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 9

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_member_imports/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_member_imports/{id}

PATCH api/organisation_member_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member import. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_member_imports/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_member_imports/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_member_imports/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_member_imports/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member import. Example: 1

Organisation Members

POST api/organisations/{org_slug}/organisation_members

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisations/21/organisation_members" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 3839511.26579258,
    \"organisation_no\": \"velit\",
    \"organisation_member_category_id\": \"minima\",
    \"first_name\": \"quia\",
    \"last_name\": \"et\",
    \"mobile_number\": \"eos\",
    \"gender\": \"male\",
    \"dob\": \"2024-11-07T17:01:36\",
    \"email\": \"kkris@example.com\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/organisation_members"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 3839511.26579258,
    "organisation_no": "velit",
    "organisation_member_category_id": "minima",
    "first_name": "quia",
    "last_name": "et",
    "mobile_number": "eos",
    "gender": "male",
    "dob": "2024-11-07T17:01:36",
    "email": "kkris@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/organisation_members';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 3839511.26579258,
            'organisation_no' => 'velit',
            'organisation_member_category_id' => 'minima',
            'first_name' => 'quia',
            'last_name' => 'et',
            'mobile_number' => 'eos',
            'gender' => 'male',
            'dob' => '2024-11-07T17:01:36',
            'email' => 'kkris@example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

POST api/organisations/{org_slug}/organisation_members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Body Parameters

organisation_id   number   

Example: 3839511.2657926

organisation_no   string  optional  

Example: velit

member_id   string  optional  

This field is required when none of first_name, last_name, mobile_number, and gender are present.

organisation_member_category_id   string   

Example: minima

first_name   string  optional  

This field is required when member_id is not present. Example: quia

last_name   string  optional  

This field is required when member_id is not present. Example: et

mobile_number   string  optional  

This field is required when member_id is not present. Example: eos

gender   string  optional  

This field is required when member_id is not present. Example: male

Must be one of:
  • male
  • female
dob   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:36

email   string  optional  

Must be a valid email address. Example: kkris@example.com

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/organisation_members?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/organisation_members"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/organisation_members';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/organisation_members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/organisations/{org_slug}/memberships

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisations/21/memberships" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 46923359.77487,
    \"organisation_no\": \"sit\",
    \"organisation_member_category_id\": \"sit\",
    \"first_name\": \"labore\",
    \"last_name\": \"et\",
    \"mobile_number\": \"reiciendis\",
    \"gender\": \"male\",
    \"dob\": \"2024-11-07T17:01:36\",
    \"email\": \"jazmyne30@example.org\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/memberships"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 46923359.77487,
    "organisation_no": "sit",
    "organisation_member_category_id": "sit",
    "first_name": "labore",
    "last_name": "et",
    "mobile_number": "reiciendis",
    "gender": "male",
    "dob": "2024-11-07T17:01:36",
    "email": "jazmyne30@example.org"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/memberships';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 46923359.77487,
            'organisation_no' => 'sit',
            'organisation_member_category_id' => 'sit',
            'first_name' => 'labore',
            'last_name' => 'et',
            'mobile_number' => 'reiciendis',
            'gender' => 'male',
            'dob' => '2024-11-07T17:01:36',
            'email' => 'jazmyne30@example.org',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

POST api/organisations/{org_slug}/memberships

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Body Parameters

organisation_id   number   

Example: 46923359.77487

organisation_no   string  optional  

Example: sit

member_id   string  optional  

This field is required when none of first_name, last_name, mobile_number, and gender are present.

organisation_member_category_id   string   

Example: sit

first_name   string  optional  

This field is required when member_id is not present. Example: labore

last_name   string  optional  

This field is required when member_id is not present. Example: et

mobile_number   string  optional  

This field is required when member_id is not present. Example: reiciendis

gender   string  optional  

This field is required when member_id is not present. Example: male

Must be one of:
  • male
  • female
dob   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:36

email   string  optional  

Must be a valid email address. Example: jazmyne30@example.org

Delete Membership

requires authentication

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisations/21/memberships/corrupti" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/memberships/corrupti"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/memberships/corrupti';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

DELETE api/organisations/{org_slug}/memberships/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

id   string   

The ID of the membership. Example: corrupti

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/21/memberships?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21/memberships"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21/memberships';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Invalid organisation identifier specified",
    "exception": "Symfony\\Component\\HttpKernel\\Exception\\HttpException",
    "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php",
    "line": 1360,
    "trace": [
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\helpers.php",
            "line": 47,
            "function": "abort",
            "class": "Illuminate\\Foundation\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\MultiTenantWithoutAuthentication.php",
            "line": 31,
            "function": "abort"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\MultiTenantWithoutAuthentication",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Middleware\\SubstituteBindings.php",
            "line": 50,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 805,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 784,
            "function": "runRouteWithinStack",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 748,
            "function": "runRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php",
            "line": 737,
            "function": "dispatchToRoute",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 200,
            "function": "dispatch",
            "class": "Illuminate\\Routing\\Router",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 144,
            "function": "Illuminate\\Foundation\\Http\\{closure}",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\app\\Http\\Middleware\\Cors.php",
            "line": 34,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "App\\Http\\Middleware\\Cors",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull.php",
            "line": 31,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php",
            "line": 21,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TrimStrings.php",
            "line": 51,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\TrimStrings",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\ValidatePostSize.php",
            "line": 27,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance.php",
            "line": 110,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Http\\Middleware\\TrustProxies.php",
            "line": 57,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 183,
            "function": "handle",
            "class": "Illuminate\\Http\\Middleware\\TrustProxies",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php",
            "line": 119,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 175,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php",
            "line": 144,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 310,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 298,
            "function": "callLaravelOrLumenRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 91,
            "function": "makeApiCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 44,
            "function": "makeResponseCall",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Strategies\\Responses\\ResponseCalls.php",
            "line": 35,
            "function": "makeResponseCallIfConditionsPass",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 236,
            "function": "__invoke",
            "class": "Knuckles\\Scribe\\Extracting\\Strategies\\Responses\\ResponseCalls",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 163,
            "function": "iterateThroughStrategies",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Extracting\\Extractor.php",
            "line": 95,
            "function": "fetchResponses",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 125,
            "function": "processRoute",
            "class": "Knuckles\\Scribe\\Extracting\\Extractor",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 72,
            "function": "extractEndpointsInfoFromLaravelApp",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\GroupedEndpoints\\GroupedEndpointsFromApp.php",
            "line": 50,
            "function": "extractEndpointsInfoAndWriteToDisk",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\knuckleswtf\\scribe\\src\\Commands\\GenerateDocumentation.php",
            "line": 53,
            "function": "get",
            "class": "Knuckles\\Scribe\\GroupedEndpoints\\GroupedEndpointsFromApp",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 36,
            "function": "handle",
            "class": "Knuckles\\Scribe\\Commands\\GenerateDocumentation",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Util.php",
            "line": 41,
            "function": "Illuminate\\Container\\{closure}",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 93,
            "function": "unwrapIfClosure",
            "class": "Illuminate\\Container\\Util",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\BoundMethod.php",
            "line": 35,
            "function": "callBoundMethod",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php",
            "line": 662,
            "function": "call",
            "class": "Illuminate\\Container\\BoundMethod",
            "type": "::"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 213,
            "function": "call",
            "class": "Illuminate\\Container\\Container",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Command\\Command.php",
            "line": 279,
            "function": "execute",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Console\\Command.php",
            "line": 182,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Command\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 1047,
            "function": "run",
            "class": "Illuminate\\Console\\Command",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 316,
            "function": "doRunCommand",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\symfony\\console\\Application.php",
            "line": 167,
            "function": "doRun",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Console\\Kernel.php",
            "line": 196,
            "function": "run",
            "class": "Symfony\\Component\\Console\\Application",
            "type": "->"
        },
        {
            "file": "D:\\memberz-api\\artisan",
            "line": 35,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Console\\Kernel",
            "type": "->"
        }
    ]
}
 

Request      

GET api/organisations/{org_slug}/memberships

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

org_slug   integer   

The slug of the org. Example: 21

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Basic Statistics

requires authentication

Returns a basic set of statistics about memberships

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/statistics" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/statistics"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/statistics';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members/statistics

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Unapproved Registrations

requires authentication

Returns a list of unapproved registrations

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/unapproved" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/unapproved"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/unapproved';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members/unapproved

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/search?limit=3&page=1&sort=latest&fieldName=excepturi" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "excepturi",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'excepturi',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

POST api/organisation_members

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_members" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 22262.072359,
    \"organisation_no\": \"quam\",
    \"organisation_member_category_id\": \"ut\",
    \"first_name\": \"ex\",
    \"last_name\": \"quibusdam\",
    \"mobile_number\": \"et\",
    \"gender\": \"female\",
    \"dob\": \"2024-11-07T17:01:39\",
    \"email\": \"christa24@example.com\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 22262.072359,
    "organisation_no": "quam",
    "organisation_member_category_id": "ut",
    "first_name": "ex",
    "last_name": "quibusdam",
    "mobile_number": "et",
    "gender": "female",
    "dob": "2024-11-07T17:01:39",
    "email": "christa24@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 22262.072359,
            'organisation_no' => 'quam',
            'organisation_member_category_id' => 'ut',
            'first_name' => 'ex',
            'last_name' => 'quibusdam',
            'mobile_number' => 'et',
            'gender' => 'female',
            'dob' => '2024-11-07T17:01:39',
            'email' => 'christa24@example.com',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_members

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 22262.072359

organisation_no   string  optional  

Example: quam

member_id   string  optional  

This field is required when none of first_name, last_name, mobile_number, and gender are present.

organisation_member_category_id   string   

Example: ut

first_name   string  optional  

This field is required when member_id is not present. Example: ex

last_name   string  optional  

This field is required when member_id is not present. Example: quibusdam

mobile_number   string  optional  

This field is required when member_id is not present. Example: et

gender   string  optional  

This field is required when member_id is not present. Example: female

Must be one of:
  • male
  • female
dob   string  optional  

Must be a valid date. Example: 2024-11-07T17:01:39

email   string  optional  

Must be a valid email address. Example: christa24@example.com

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_members/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_members/711" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/711"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/711';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_members/{id}

PATCH api/organisation_members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member. Example: 711

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Membership

requires authentication

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_members/711" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_members/711"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_members/711';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

DELETE api/organisation_members/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation member. Example: 711

Organisation Payment Platforms

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/payment_platforms/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/payment_platforms/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/payment_platforms/search?limit=3&page=1&sort=latest&fieldName=aut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "aut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'aut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/payment_platforms?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/payment_platforms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/payment_platforms" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"name\": \"quo\",
    \"method_name\": \"ipsum\",
    \"config_keys\": \"numquam\",
    \"description\": \"Id qui illo et veniam quibusdam et quidem.\",
    \"logo\": \"amet\",
    \"instructions\": \"quaerat\",
    \"deleted\": true
}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "name": "quo",
    "method_name": "ipsum",
    "config_keys": "numquam",
    "description": "Id qui illo et veniam quibusdam et quidem.",
    "logo": "amet",
    "instructions": "quaerat",
    "deleted": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'name' => 'quo',
            'method_name' => 'ipsum',
            'config_keys' => 'numquam',
            'description' => 'Id qui illo et veniam quibusdam et quidem.',
            'logo' => 'amet',
            'instructions' => 'quaerat',
            'deleted' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 2,
        "name": "Slydepay",
        "description": "Slydepay Payments Solution",
        "method_name": "slydepay",
        "config_keys": "Merchant Email, Merchant Key",
        "logo": "payment_platforms/slydepay.png",
        "instructions": "You will be redirected to the Slydepay payment portal to complete the transaction for this payment. You can pay with either a Credit/Debit Card, Mobile Money or your Slydepay Mobile Wallet.",
        "created": "2016-06-02T08:13:25.000000Z",
        "modified": "2016-06-02T08:13:29.000000Z",
        "deleted": false
    }
}
 

Request      

POST api/payment_platforms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

name   string  optional  

Name Example: quo

method_name   string  optional  

Method name Example: ipsum

config_keys   string  optional  

Comma separated config keys Example: numquam

description   string  optional  

Description Example: Id qui illo et veniam quibusdam et quidem.

logo   string  optional  

Description Example: amet

instructions   string  optional  

Description Example: quaerat

deleted   boolean  optional  

Deleted Example: true

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/payment_platforms/8" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms/8"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms/8';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 8

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/payment_platforms/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"name\": \"est\",
    \"method_name\": \"et\",
    \"config_keys\": \"in\",
    \"description\": \"Eos nam dolore non quod hic nemo.\",
    \"logo\": \"et\",
    \"instructions\": \"itaque\",
    \"deleted\": true
}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "name": "est",
    "method_name": "et",
    "config_keys": "in",
    "description": "Eos nam dolore non quod hic nemo.",
    "logo": "et",
    "instructions": "itaque",
    "deleted": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms/2';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'name' => 'est',
            'method_name' => 'et',
            'config_keys' => 'in',
            'description' => 'Eos nam dolore non quod hic nemo.',
            'logo' => 'et',
            'instructions' => 'itaque',
            'deleted' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 2,
        "name": "Slydepay",
        "description": "Slydepay Payments Solution",
        "method_name": "slydepay",
        "config_keys": "Merchant Email, Merchant Key",
        "logo": "payment_platforms/slydepay.png",
        "instructions": "You will be redirected to the Slydepay payment portal to complete the transaction for this payment. You can pay with either a Credit/Debit Card, Mobile Money or your Slydepay Mobile Wallet.",
        "created": "2016-06-02T08:13:25.000000Z",
        "modified": "2016-06-02T08:13:29.000000Z",
        "deleted": false
    }
}
 

Request      

PUT api/payment_platforms/{id}

PATCH api/payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the payment platform. Example: 2

Body Parameters

name   string  optional  

Name Example: est

method_name   string  optional  

Method name Example: et

config_keys   string  optional  

Comma separated config keys Example: in

description   string  optional  

Description Example: Eos nam dolore non quod hic nemo.

logo   string  optional  

Description Example: et

instructions   string  optional  

Description Example: itaque

deleted   boolean  optional  

Deleted Example: true

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/payment_platforms/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/payment_platforms/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/payment_platforms/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the payment platform. Example: 2

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_payment_platforms/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_payment_platforms/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_payment_platforms/search?limit=3&page=1&sort=latest&fieldName=tenetur" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "tenetur",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'tenetur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_payment_platforms?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_payment_platforms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_payment_platforms" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 62233.93089888,
    \"payment_platform_id\": 15025.14,
    \"currency_id\": 460149.73791741,
    \"country_id\": 19.1577,
    \"config\": \"eius\",
    \"platform_mode\": \"live\",
    \"member_registration_instruction\": \"itaque\",
    \"event_registration_instruction\": \"ipsum\",
    \"general_instructions\": \"dolor\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 62233.93089888,
    "payment_platform_id": 15025.14,
    "currency_id": 460149.73791741,
    "country_id": 19.1577,
    "config": "eius",
    "platform_mode": "live",
    "member_registration_instruction": "itaque",
    "event_registration_instruction": "ipsum",
    "general_instructions": "dolor"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 62233.93089888,
            'payment_platform_id' => 15025.14,
            'currency_id' => 460149.73791741,
            'country_id' => 19.1577,
            'config' => 'eius',
            'platform_mode' => 'live',
            'member_registration_instruction' => 'itaque',
            'event_registration_instruction' => 'ipsum',
            'general_instructions' => 'dolor',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 114,
        "payment_platform_id": 1,
        "currency_id": 80,
        "country_id": 80,
        "config": {
            "Master Key": "6bb24be9-c357-430c-94d6-a39108055b5d",
            "Public Key": "live_public_4Z9UnJ6Dl6pz2u0U6wOtAWD8oSY",
            "Private Key": "live_private_QYwRKqiaYDipuLAXshQ3KBMTKZg",
            "Token": "333ae6351b4ccbaa5636",
            "Store Name": "MFANSTIPIM OLD BOYS ASSOCIATION 2002",
            "Tag Line": "MOBA 2002",
            "Phone Number": "0244371416",
            "Postal Address": "BOX 196"
        },
        "platform_mode": "live",
        "member_registration_instruction": null,
        "event_registration_instruction": null,
        "general_instructions": null,
        "system_generated": false,
        "created": "2016-05-29T19:45:52.000000Z",
        "modified": "2016-05-29T19:45:52.000000Z",
        "deleted": false,
        "currency": {
            "id": 80,
            "country_id": 80,
            "currency_name": "Ghanaian Cedi",
            "currency_code": "GHS",
            "active": true
        },
        "payment_platform": null
    }
}
 

Request      

POST api/organisation_payment_platforms

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_id   number   

Example: 62233.93089888

payment_platform_id   number   

Example: 15025.14

currency_id   number   

Example: 460149.73791741

country_id   number   

Example: 19.1577

config   string   

Example: eius

platform_mode   string   

Example: live

Must be one of:
  • live
  • sandbox
  • dev
member_registration_instruction   string  optional  

Example: itaque

event_registration_instruction   string  optional  

Example: ipsum

general_instructions   string  optional  

Example: dolor

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_payment_platforms/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms/11';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 11

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_payment_platforms/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 51.98133,
    \"payment_platform_id\": 3.8,
    \"currency_id\": 274.66,
    \"country_id\": 44294081.05,
    \"config\": \"totam\",
    \"platform_mode\": \"sandbox\",
    \"member_registration_instruction\": \"dolores\",
    \"event_registration_instruction\": \"nulla\",
    \"general_instructions\": \"consequatur\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 51.98133,
    "payment_platform_id": 3.8,
    "currency_id": 274.66,
    "country_id": 44294081.05,
    "config": "totam",
    "platform_mode": "sandbox",
    "member_registration_instruction": "dolores",
    "event_registration_instruction": "nulla",
    "general_instructions": "consequatur"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 51.98133,
            'payment_platform_id' => 3.8,
            'currency_id' => 274.66,
            'country_id' => 44294081.05,
            'config' => 'totam',
            'platform_mode' => 'sandbox',
            'member_registration_instruction' => 'dolores',
            'event_registration_instruction' => 'nulla',
            'general_instructions' => 'consequatur',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "data": {
        "id": 1,
        "organisation_id": 114,
        "payment_platform_id": 1,
        "currency_id": 80,
        "country_id": 80,
        "config": {
            "Master Key": "6bb24be9-c357-430c-94d6-a39108055b5d",
            "Public Key": "live_public_4Z9UnJ6Dl6pz2u0U6wOtAWD8oSY",
            "Private Key": "live_private_QYwRKqiaYDipuLAXshQ3KBMTKZg",
            "Token": "333ae6351b4ccbaa5636",
            "Store Name": "MFANSTIPIM OLD BOYS ASSOCIATION 2002",
            "Tag Line": "MOBA 2002",
            "Phone Number": "0244371416",
            "Postal Address": "BOX 196"
        },
        "platform_mode": "live",
        "member_registration_instruction": null,
        "event_registration_instruction": null,
        "general_instructions": null,
        "system_generated": false,
        "created": "2016-05-29T19:45:52.000000Z",
        "modified": "2016-05-29T19:45:52.000000Z",
        "deleted": false,
        "currency": {
            "id": 80,
            "country_id": 80,
            "currency_name": "Ghanaian Cedi",
            "currency_code": "GHS",
            "active": true
        },
        "payment_platform": null
    }
}
 

Request      

PUT api/organisation_payment_platforms/{id}

PATCH api/organisation_payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation payment platform. Example: 1

Body Parameters

organisation_id   number   

Example: 51.98133

payment_platform_id   number   

Example: 3.8

currency_id   number   

Example: 274.66

country_id   number   

Example: 44294081.05

config   string   

Example: totam

platform_mode   string   

Example: sandbox

Must be one of:
  • live
  • sandbox
  • dev
member_registration_instruction   string  optional  

Example: dolores

event_registration_instruction   string  optional  

Example: nulla

general_instructions   string  optional  

Example: consequatur

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_payment_platforms/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_payment_platforms/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_payment_platforms/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_payment_platforms/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation payment platform. Example: 1

Organisation Roles

Get Permissions

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_roles/1/permissions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/1/permissions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/1/permissions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_roles/{id}/permissions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer  optional  

ID of role to retrieve permissions for. Example: 1

Sync Permissions

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_roles/1/permissions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/1/permissions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/1/permissions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_roles/{id}/permissions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation role. Example: 1

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_roles/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_roles/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_roles/search?limit=3&page=1&sort=latest&fieldName=voluptas" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "voluptas",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'voluptas',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_roles?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_roles

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_roles" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_roles

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_roles/12" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/12"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/12';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_roles/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 12

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_roles/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_roles/{id}

PATCH api/organisation_roles/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation role. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_roles/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_roles/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_roles/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_roles/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation role. Example: 1

Organisation Setting Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_setting_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_setting_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_setting_types/search?limit=3&page=1&sort=latest&fieldName=blanditiis" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "blanditiis",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'blanditiis',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_setting_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_setting_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_setting_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_setting_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_setting_types/19" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types/19"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types/19';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_setting_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 19

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_setting_types/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types/2';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_setting_types/{id}

PATCH api/organisation_setting_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation setting type. Example: 2

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_setting_types/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_setting_types/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_setting_types/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_setting_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation setting type. Example: 2

Organisation Settings

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_settings/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_settings/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_settings/search?limit=3&page=1&sort=latest&fieldName=voluptate" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "voluptate",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'voluptate',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_settings?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_settings" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_settings/3" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings/3"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings/3';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_settings/{id}

PATCH api/organisation_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation setting. Example: 3

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_settings/3" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_settings/3"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_settings/3';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation setting. Example: 3

Organisation Subscrptions

Pass the current subscription to be renewed Pass the renewal length

requires authentication

Auto determine organisation_id Auto determine current subscription_type

Actions: create an invoice for the transaction, return new subscription with invoice

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_subscriptions/11/renew" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 402.4053801,
    \"length\": 50
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/11/renew"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 402.4053801,
    "length": 50
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/11/renew';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 402.4053801,
            'length' => 50.0,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_subscriptions/{id}/renew

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation subscription. Example: 11

Body Parameters

organisation_id   number   

Example: 402.4053801

length   number   

Example: 50

Pass the current subscription to be upgraded Pass the new subscription_type to upgrade to Pass the subscription length

requires authentication

Auto determine organisation_id

Actions: create an invoice for the transaction, insert new subscription with invoice info

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_subscriptions/11/upgrade" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_id\": 36.977,
    \"subscription_type_id\": 28497242.3,
    \"length\": 5696.524740013
}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/11/upgrade"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_id": 36.977,
    "subscription_type_id": 28497242.3,
    "length": 5696.524740013
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/11/upgrade';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_id' => 36.977,
            'subscription_type_id' => 28497242.3,
            'length' => 5696.524740013,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisation_subscriptions/{id}/upgrade

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation subscription. Example: 11

Body Parameters

organisation_id   number   

Example: 36.977

subscription_type_id   number   

Example: 28497242.3

length   number   

Example: 5696.524740013

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_subscriptions/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_subscriptions/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_subscriptions/search?limit=3&page=1&sort=latest&fieldName=dignissimos" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "dignissimos",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'dignissimos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_subscriptions?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_subscriptions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_subscriptions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_subscriptions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_subscriptions/16" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/16"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_subscriptions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 16

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_subscriptions/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/11';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_subscriptions/{id}

PATCH api/organisation_subscriptions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation subscription. Example: 11

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_subscriptions/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_subscriptions/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_subscriptions/11';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_subscriptions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation subscription. Example: 11

Organisation Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_types/search?limit=3&page=1&sort=latest&fieldName=quidem" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quidem",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quidem',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisation_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisation_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/organisation_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisation_types/14" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types/14"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types/14';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/organisation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 14

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisation_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/organisation_types/{id}

PATCH api/organisation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation type. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisation_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisation_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisation_types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisation_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation type. Example: 1

Organisations

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/public?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/public"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/public';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "data": [
        {
            "id": 348,
            "uuid": "394dca7c-a0cb-434d-853a-7950ea8fc912",
            "organisation_type_id": 3,
            "name": "Savanna Opticals and Eyecare",
            "slug": "savanna-opticals-and-eyecare-95477",
            "address": "Sabonkudi Plaza",
            "city": "Tamale",
            "state": "Northern",
            "post_code": "03720",
            "country_id": 80,
            "currency_id": 80,
            "email": "dan1ogee@gmail.com",
            "phone": "+233200252386",
            "website": null,
            "logo": null,
            "short_description": null,
            "long_description": null,
            "mission": null,
            "cover_photo": null,
            "member_account_id": 2722,
            "organisation_member_count": 0,
            "organisation_account_count": 0,
            "discoverable": 1,
            "allow_public_join": 0,
            "default_public_join_category": null,
            "public_directory_enabled": 1,
            "locked": 0,
            "verified": 0,
            "verified_by": null,
            "created": "2024-06-10T13:08:05.000000Z",
            "modified": "2024-06-10T13:08:05.000000Z",
            "active": true,
            "trashed": 0,
            "active_subscription": {
                "id": 440,
                "organisation_id": 348,
                "subscription_type_id": 11,
                "organisation_invoice_id": 947,
                "start_dt": "2024-06-10T13:08:06.000000Z",
                "end_dt": "2024-07-10T13:08:06.000000Z",
                "length": 1,
                "current": true,
                "last_renewal_notice_dt": null,
                "created": "2024-06-10T13:08:06.000000Z",
                "modified": "2024-06-10T13:08:06.000000Z",
                "organisation_invoice": {
                    "id": 947,
                    "organisation_id": 348,
                    "transaction_type_id": 2,
                    "member_account_id": 2722,
                    "invoice_no": "34800947",
                    "paid": true,
                    "currency_id": 80,
                    "total_due": 0,
                    "due_date": "2024-06-17",
                    "notes": "Your new organisation will be temporarily enabled for <b>7 days</b> within which you will be required to make\n                    payment for your chosen subscription via any cash, cheque or bank transfer to the indicated bank account. <br /><br />\n\n                    Your new organisation setup will be disabled after <b>7 days</b> pending payment.",
                    "created": "2024-06-10T13:08:06.000000Z",
                    "modified": "2024-06-10T13:08:06.000000Z",
                    "deleted": false,
                    "deleted_by": null,
                    "organisation_invoice_items": [
                        {
                            "id": 1010,
                            "organisation_invoice_id": 947,
                            "qty": 1,
                            "product_type": "subscription",
                            "product_id": 11,
                            "description": "Free Plan Subscription (1 Month)",
                            "unit_price": 0,
                            "tax_amount": null,
                            "gross_total": null,
                            "total": 0,
                            "created": "2024-06-10T13:08:06.000000Z",
                            "modified": "2024-06-10T13:08:06.000000Z",
                            "deleted": false
                        }
                    ],
                    "transaction_type": {
                        "id": 2,
                        "group": "organisation",
                        "name": "Subscription Purchase",
                        "member_can_cancel": false,
                        "created": "2015-06-01T13:33:46.000000Z",
                        "modified": "2015-06-01T13:33:49.000000Z",
                        "active": true
                    },
                    "currency": {
                        "id": 80,
                        "country_id": 80,
                        "currency_name": "Ghanaian Cedi",
                        "currency_code": "GHS",
                        "active": true
                    }
                },
                "subscription_type": {
                    "id": 11,
                    "name": "free2",
                    "description": "Free Plan",
                    "capacity": 250,
                    "validity": "forever",
                    "currency_id": 80,
                    "initial_price": 0,
                    "renewal_price": 0,
                    "billing_required": "no",
                    "initial_sms_credit": 15,
                    "monthly_sms_bonus": 0,
                    "accounts": 10,
                    "reporting": "advanced",
                    "revenue_tracking": false,
                    "expenditure_tracking": false,
                    "events": true,
                    "featured": false,
                    "created": "2017-07-15T13:36:51.000000Z",
                    "modified": "2022-01-13T05:55:05.000000Z",
                    "promotional": false,
                    "active": true
                }
            },
            "organisation_type": {
                "id": 3,
                "name": "Business",
                "organisation_count": 0
            }
        },
        {
            "id": 347,
            "uuid": "212b3f1a-f05e-40ec-b598-c6f650945467",
            "organisation_type_id": 6,
            "name": "Tree Bottom Club",
            "slug": "tree-bottom-club-32066",
            "address": "#11 Nii Ankrah Rd., Community 18, Lashibi",
            "city": "Tema",
            "state": "Greater Accra",
            "post_code": "GT-025-0337",
            "country_id": 80,
            "currency_id": 80,
            "email": "treebottomclub@gmail.com",
            "phone": "+233502859254",
            "website": null,
            "logo": null,
            "short_description": null,
            "long_description": null,
            "mission": null,
            "cover_photo": null,
            "member_account_id": 2721,
            "organisation_member_count": 0,
            "organisation_account_count": 0,
            "discoverable": 1,
            "allow_public_join": 0,
            "default_public_join_category": null,
            "public_directory_enabled": 1,
            "locked": 0,
            "verified": 0,
            "verified_by": null,
            "created": "2024-05-27T17:40:12.000000Z",
            "modified": "2024-05-27T17:40:12.000000Z",
            "active": true,
            "trashed": 0,
            "active_subscription": {
                "id": 439,
                "organisation_id": 347,
                "subscription_type_id": 11,
                "organisation_invoice_id": 945,
                "start_dt": "2024-05-27T17:40:12.000000Z",
                "end_dt": "2024-06-27T17:40:12.000000Z",
                "length": 1,
                "current": true,
                "last_renewal_notice_dt": null,
                "created": "2024-05-27T17:40:12.000000Z",
                "modified": "2024-05-27T17:40:12.000000Z",
                "organisation_invoice": {
                    "id": 945,
                    "organisation_id": 347,
                    "transaction_type_id": 2,
                    "member_account_id": 2721,
                    "invoice_no": "34700945",
                    "paid": true,
                    "currency_id": 80,
                    "total_due": 0,
                    "due_date": "2024-06-03",
                    "notes": "Your new organisation will be temporarily enabled for <b>7 days</b> within which you will be required to make\n                    payment for your chosen subscription via any cash, cheque or bank transfer to the indicated bank account. <br /><br />\n\n                    Your new organisation setup will be disabled after <b>7 days</b> pending payment.",
                    "created": "2024-05-27T17:40:12.000000Z",
                    "modified": "2024-05-27T17:40:12.000000Z",
                    "deleted": false,
                    "deleted_by": null,
                    "organisation_invoice_items": [
                        {
                            "id": 1008,
                            "organisation_invoice_id": 945,
                            "qty": 1,
                            "product_type": "subscription",
                            "product_id": 11,
                            "description": "Free Plan Subscription (1 Month)",
                            "unit_price": 0,
                            "tax_amount": null,
                            "gross_total": null,
                            "total": 0,
                            "created": "2024-05-27T17:40:12.000000Z",
                            "modified": "2024-05-27T17:40:12.000000Z",
                            "deleted": false
                        }
                    ],
                    "transaction_type": {
                        "id": 2,
                        "group": "organisation",
                        "name": "Subscription Purchase",
                        "member_can_cancel": false,
                        "created": "2015-06-01T13:33:46.000000Z",
                        "modified": "2015-06-01T13:33:49.000000Z",
                        "active": true
                    },
                    "currency": {
                        "id": 80,
                        "country_id": 80,
                        "currency_name": "Ghanaian Cedi",
                        "currency_code": "GHS",
                        "active": true
                    }
                },
                "subscription_type": {
                    "id": 11,
                    "name": "free2",
                    "description": "Free Plan",
                    "capacity": 250,
                    "validity": "forever",
                    "currency_id": 80,
                    "initial_price": 0,
                    "renewal_price": 0,
                    "billing_required": "no",
                    "initial_sms_credit": 15,
                    "monthly_sms_bonus": 0,
                    "accounts": 10,
                    "reporting": "advanced",
                    "revenue_tracking": false,
                    "expenditure_tracking": false,
                    "events": true,
                    "featured": false,
                    "created": "2017-07-15T13:36:51.000000Z",
                    "modified": "2022-01-13T05:55:05.000000Z",
                    "promotional": false,
                    "active": true
                }
            },
            "organisation_type": {
                "id": 6,
                "name": "Association",
                "organisation_count": 0
            }
        },
        {
            "id": 346,
            "uuid": "74780887-084a-4999-9040-51f540da7a04",
            "organisation_type_id": 1,
            "name": "EW C",
            "slug": "ew-c-25446",
            "address": null,
            "city": null,
            "state": null,
            "post_code": null,
            "country_id": 80,
            "currency_id": 80,
            "email": "nanayiadom260@gmail.com",
            "phone": "+233575522395",
            "website": null,
            "logo": null,
            "short_description": null,
            "long_description": null,
            "mission": null,
            "cover_photo": null,
            "member_account_id": 2718,
            "organisation_member_count": 0,
            "organisation_account_count": 0,
            "discoverable": 1,
            "allow_public_join": 0,
            "default_public_join_category": null,
            "public_directory_enabled": 1,
            "locked": 0,
            "verified": 0,
            "verified_by": null,
            "created": "2024-04-14T23:28:58.000000Z",
            "modified": "2024-04-14T23:28:58.000000Z",
            "active": true,
            "trashed": 0,
            "active_subscription": {
                "id": 436,
                "organisation_id": 346,
                "subscription_type_id": 11,
                "organisation_invoice_id": 942,
                "start_dt": "2024-04-14T23:28:58.000000Z",
                "end_dt": "2024-05-14T23:28:58.000000Z",
                "length": 1,
                "current": true,
                "last_renewal_notice_dt": null,
                "created": "2024-04-14T23:28:58.000000Z",
                "modified": "2024-04-14T23:28:58.000000Z",
                "organisation_invoice": {
                    "id": 942,
                    "organisation_id": 346,
                    "transaction_type_id": 2,
                    "member_account_id": 2718,
                    "invoice_no": "34600942",
                    "paid": true,
                    "currency_id": 80,
                    "total_due": 0,
                    "due_date": "2024-04-21",
                    "notes": "Your new organisation will be temporarily enabled for <b>7 days</b> within which you will be required to make\n                    payment for your chosen subscription via any cash, cheque or bank transfer to the indicated bank account. <br /><br />\n\n                    Your new organisation setup will be disabled after <b>7 days</b> pending payment.",
                    "created": "2024-04-14T23:28:58.000000Z",
                    "modified": "2024-04-14T23:28:58.000000Z",
                    "deleted": false,
                    "deleted_by": null,
                    "organisation_invoice_items": [
                        {
                            "id": 1003,
                            "organisation_invoice_id": 942,
                            "qty": 1,
                            "product_type": "subscription",
                            "product_id": 11,
                            "description": "Free Plan Subscription (1 Month)",
                            "unit_price": 0,
                            "tax_amount": null,
                            "gross_total": null,
                            "total": 0,
                            "created": "2024-04-14T23:28:58.000000Z",
                            "modified": "2024-04-14T23:28:58.000000Z",
                            "deleted": false
                        }
                    ],
                    "transaction_type": {
                        "id": 2,
                        "group": "organisation",
                        "name": "Subscription Purchase",
                        "member_can_cancel": false,
                        "created": "2015-06-01T13:33:46.000000Z",
                        "modified": "2015-06-01T13:33:49.000000Z",
                        "active": true
                    },
                    "currency": {
                        "id": 80,
                        "country_id": 80,
                        "currency_name": "Ghanaian Cedi",
                        "currency_code": "GHS",
                        "active": true
                    }
                },
                "subscription_type": {
                    "id": 11,
                    "name": "free2",
                    "description": "Free Plan",
                    "capacity": 250,
                    "validity": "forever",
                    "currency_id": 80,
                    "initial_price": 0,
                    "renewal_price": 0,
                    "billing_required": "no",
                    "initial_sms_credit": 15,
                    "monthly_sms_bonus": 0,
                    "accounts": 10,
                    "reporting": "advanced",
                    "revenue_tracking": false,
                    "expenditure_tracking": false,
                    "events": true,
                    "featured": false,
                    "created": "2017-07-15T13:36:51.000000Z",
                    "modified": "2022-01-13T05:55:05.000000Z",
                    "promotional": false,
                    "active": true
                }
            },
            "organisation_type": {
                "id": 1,
                "name": "Religious Organisation",
                "organisation_count": 0
            }
        }
    ],
    "links": {
        "first": "http://api.memberz.test/api/organisations/public?page=1",
        "last": "http://api.memberz.test/api/organisations/public?page=65",
        "prev": null,
        "next": "http://api.memberz.test/api/organisations/public?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 65,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=5",
                "label": "5",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=6",
                "label": "6",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=7",
                "label": "7",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=8",
                "label": "8",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=9",
                "label": "9",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=10",
                "label": "10",
                "active": false
            },
            {
                "url": null,
                "label": "...",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=64",
                "label": "64",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=65",
                "label": "65",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/organisations/public?page=2",
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://api.memberz.test/api/organisations/public",
        "per_page": 3,
        "to": 3,
        "total": 193
    }
}
 

Request      

GET api/organisations/public

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Get Organisation Slugs

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/slugs" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/slugs"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/slugs';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "data": [
        "demo",
        "cbctaifa",
        "gmpc",
        "puc-alumni",
        "reunion-chapel-international-95453",
        "calvary-methodist-church-adabraka",
        "my-trial-org-69133",
        "church-of-christ-danfa-49446",
        "apostolic-ministerial-international-network-34810",
        "community-colleges-initiative-alumni-21396",
        "love-community-baptist-church-46308",
        "breda",
        "weapons-of-fire-deliverance-ministry-youth-fellows",
        "nubsaa",
        "harvest-chapel-demo-64164",
        "ugscs",
        "seinti-family-74162",
        "pssl-foundation-50206",
        "gbcpa",
        "staff-org-42048",
        "greenfield-residents-association-parakuo-estate-75",
        "agrislove-25398",
        "north-darkuman-presby-95558",
        "apc",
        "old-achimotans-association-2001-21521",
        "ghanainsurers",
        "aci-kaneshie-23341",
        "icare-foundation-ghana-88194",
        "baosa-knust-11898",
        "ahodwo-executive-chapter-fgbmfi-89625",
        "national-union-of-baptist-students-nubs-14115",
        "amazing-grace-baptist-church-bubiashie-73568",
        "treasure-kids-foundation-48678",
        "skpt-94922",
        "moba-2002",
        "the-star-of-david-69983",
        "itc-workers-association-92618",
        "accra-north-circuit-methodist-church-14491",
        "winners-chapel-ghana-71959",
        "triumphant-baptist-church-79948",
        "ahodwo-executive-chapter-35971",
        "creator-s-blessing-church-14071",
        "ispace-foundation-44609",
        "providence-baptist-church",
        "hoversol-limited-71973",
        "x-fitness-gym-16439",
        "gpi-team-46387",
        "dreamoval",
        "kosa99",
        "worshippers-65065",
        "ggbc-wa",
        "beulah-sda-church-56347",
        "presec-2000-79235",
        "bekwai-s-d-a-j-s-s-1999-class-35082",
        "tadenk-group-of-companies-65170",
        "josa-2000-year-group-54177",
        "wisconsin-international-university-college-alumni-",
        "oaa",
        "aviness-55354",
        "church-of-thessalonians-int-65655",
        "bfl",
        "apc-election-committee-87534",
        "qwickfusion-68101",
        "calvary-jewels-patrons-33946",
        "dominion-mandate-chapel-52470",
        "marshalls-46509",
        "knights-of-marshall-c-37-18475",
        "biwc",
        "bahmed-travel-and-tours-77471",
        "absosa-edu",
        "alrotec-solutions-95360",
        "perez-chapel-int-resurection-temple-adenta-53191",
        "rotary-club-of-accra-la-east-85481",
        "a-plus-93520",
        "moba2g3",
        "vibrations-70869",
        "oaa99-12356",
        "country-alliance-on-mental-illness-27826",
        "alrotec-solutions-43881",
        "keep-your-man-101-74119",
        "jesus-is-lord-worship-centre-a-g-77877",
        "iipgh",
        "elistech-60897",
        "nubs-ucc-34634",
        "gbc",
        "dusaf-13129",
        "noble-cares-foundation-ncf-98006",
        "gmpc-youth-fellowship-29206",
        "national-seed-trade-association-of-ghana-93058",
        "pastor-michael-ministries-88268",
        "pcg-aotc-yaf",
        "wealthcreation-53598",
        "diana-care-international-50993",
        "ark-of-praise-gmpc-22553",
        "faith-movers-chapel-intl-22009",
        "boaitey-family-21341",
        "duakwa-vocatioal-training-institute-26545",
        "daybreak-chapel-international-20417",
        "free-sisters-82751",
        "kings-power-chapel-international-63682",
        "global-revival-ministry-la-84935",
        "creative-koncerpt-31659",
        "powermark-22221",
        "nana-kwesi-media-skuul-58251",
        "accra-diocese-myf-21781",
        "akata-places-86700",
        "nubs-korlebu",
        "lawson-okereke-ministries-89549",
        "aalizahmatkesh-15247",
        "nubs-legon",
        "sbn-partners-47153",
        "word-and-spirit-feasts",
        "abusua-nkosuo-plan-18177",
        "exalted-18-95936",
        "graduates-in-village-evangelism-give-94392",
        "bright-kids",
        "biwc-wmu-55090",
        "model-ecowas-summit-78829",
        "skypro-institute-66694",
        "mopheth-church-22396",
        "sumakor-11045",
        "power-baptist-church-74723",
        "christ-apostolic-students-associates-casa-13375",
        "de-temple-gym-fitness-and-health-centre-34628",
        "team-faith-21694",
        "global-commission-46510",
        "turf-masons-74797",
        "waterfalls-church-95744",
        "sample-database-72663",
        "believers-union-ksi",
        "bisa-ghana-30149",
        "ofankor-calvary-congregation-ypg-96822",
        "the-hud-group",
        "kandifo-institute-96862",
        "akrofi-christaller-institute-of-theology-mission-a",
        "ashaiman-district-jy-leaders-67745",
        "maame-amponsah-memorial-academy-mam-academy-22486",
        "living-streams-baptist-church-77047",
        "zion-jy-17967",
        "transvodigital",
        "central-presby-jy-members-43894",
        "jireh-prophetic-school-of-ministry-75257",
        "hallowed-charter-worldwide-58286",
        "formition-53625",
        "extraordinary-peace-enterprise-42298",
        "charismatic-pentecostal-revival-movement-87337",
        "ayim-venture-47911",
        "pvc-faith-temple-32212",
        "transvo-digital-33229",
        "national-youth-ministry-19868",
        "cop-60593",
        "repent-88387",
        "hallel-music-86108",
        "way-to-life-inc-90721",
        "ibk-consult-51623",
        "maranatha-junior-youth-26959",
        "ab-logistics-ltd-60444",
        "jordan-church-11764",
        "hope-jy-ashaiman-district-83640",
        "benok-core-club-66922",
        "ccbc",
        "the-youth-church-51385",
        "christ-s-oasis-ministries-airport-city-campus-4209",
        "isbs-alumni-association-35328",
        "hallel-kingdom-ministries-72469",
        "golden-angels-school-48480",
        "llu-78085",
        "soldiers-of-yahweh-24411",
        "vbci-als-49848",
        "hallel2-44593",
        "python-ghana-70257",
        "cac-agswedro-77184",
        "triumphant-baptist-church-kwadaso-67591",
        "ministers-conference-gbc",
        "shalom-baptist-temple-73113",
        "upper-room-chapel-25085",
        "ghana-baptist-professionals",
        "test-87299",
        "apostolic-ministerial-international-network-48106",
        "apostolic-ministerial-international-network-57388",
        "apostolic-ministerial-international-network-16884",
        "apostolic-ministerial-international-network-95002",
        "the-youth-church-32113",
        "swedru-secondary-school-2001-year-group-65767",
        "swesco-2001-year-group-93102",
        "swesco-2001year-group-68068",
        "powerflow-family-82297",
        "transvo-digital-83509",
        "adom-kiddies-home-85384",
        "goodnews-bible-church-45448",
        "ew-c-25446",
        "tree-bottom-club-32066",
        "savanna-opticals-and-eyecare-95477"
    ]
}
 

Request      

GET api/organisations/slugs

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

requires authentication

Returns a short list of organisations that one can join. Current criteria is to return the 10 most recently updated organisations with more than 25 members

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/recommended" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/recommended"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/recommended';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
 

[
    {
        "id": 21,
        "uuid": "5070006a-d56e-4571-9605-f953d7ed2892",
        "organisation_type_id": 1,
        "name": "Memberz.Org",
        "slug": "demo",
        "address": "",
        "city": "Accra",
        "state": "Greater Accra",
        "post_code": "",
        "country_id": 80,
        "currency_id": 80,
        "email": "support@memberz.org",
        "phone": "+233377593003",
        "website": "https://memberz.org/demo",
        "logo": "https://files.memberz.org/img/org_21/account/20160911_903495_155808.png",
        "short_description": "The Memberz.Org Demo Account, where we test out some of our awesome new features first. You can join this account and be part of the fun.",
        "long_description": "The Memberz.Org Demo Account, where we test out some of our awesome new features first. You can join this account and be part of the fun.",
        "mission": "",
        "cover_photo": null,
        "member_account_id": 1,
        "organisation_member_count": 11,
        "organisation_account_count": 3,
        "discoverable": 1,
        "allow_public_join": 1,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 0,
        "verified": 1,
        "verified_by": null,
        "created": "2013-08-26T23:00:03.000000Z",
        "modified": "2022-01-03T06:45:38.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 44,
        "recent_membership": "2021-05-12 14:02:26",
        "organisation_type": {
            "id": 1,
            "name": "Religious Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 44,
        "uuid": "c2a93251-672f-415d-8fb2-9c4f312b6bb0",
        "organisation_type_id": 1,
        "name": "Charismatic Baptist Church, Taifa",
        "slug": "cbctaifa",
        "address": "P. O. Box TA 21, Taifa Accra",
        "city": "Accra",
        "state": "Greater Accra",
        "post_code": null,
        "country_id": 80,
        "currency_id": 80,
        "email": "c_baptistchurch@yahoo.com",
        "phone": "+233-30-2401-392",
        "website": "http://www.facebook.com/cbctaifa",
        "logo": "https://api-beta.memberz.org/storage/organisation_logos/b64_1706921606.png",
        "short_description": "Charismatic Baptist Church has been evangelizing, winning and nurturing souls in and around the Taifa community since 1988.",
        "long_description": "A vibrant church in the heart of the Taifa community. Charismatic Baptist Church has been evangelizing, winning and nurturing souls in and around the Taifa community since 1988. We are committed to the ministry of Christ and empowered by the Holy Spirit to make a difference.\r\n\r\nLed by Rev. Joseph Adasi-Bekoe, Charismatic Baptist Church, Taifa is on a mission to continue the great commission of Jesus Christ, to ensure many come to the saving knowledge of him.",
        "mission": "To expand the Kingdom of God through the winning of souls",
        "cover_photo": null,
        "member_account_id": 1,
        "organisation_member_count": 1072,
        "organisation_account_count": 9,
        "discoverable": 1,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 1,
        "verified": 1,
        "verified_by": null,
        "created": "2014-04-08T11:57:53.000000Z",
        "modified": "2024-02-03T00:53:27.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 1467,
        "recent_membership": "2024-09-04 10:44:08",
        "organisation_type": {
            "id": 1,
            "name": "Religious Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 51,
        "uuid": "3989999d-45b8-465f-9d9a-d2d867626db2",
        "organisation_type_id": 1,
        "name": "Garrison Methodist Presbyterian Church",
        "slug": "gmpc",
        "address": "BT 488",
        "city": "Burma Camp",
        "state": "Greater Accra",
        "post_code": "00233",
        "country_id": 80,
        "currency_id": 80,
        "email": "andyadjetey@gmail.com",
        "phone": "0208373586",
        "website": "",
        "logo": "https://files.memberz.org/img/org_51/account/2015-04-01%2021.05.17.jpg",
        "short_description": "We are a church",
        "long_description": "Join the Christ Family",
        "mission": "Christ is Risen!",
        "cover_photo": null,
        "member_account_id": 13,
        "organisation_member_count": 1871,
        "organisation_account_count": 4,
        "discoverable": 1,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 0,
        "verified": 0,
        "verified_by": null,
        "created": "2014-12-31T12:36:36.000000Z",
        "modified": "2022-06-12T11:02:38.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 2441,
        "recent_membership": "2024-10-20 11:58:29",
        "organisation_type": {
            "id": 1,
            "name": "Religious Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 54,
        "uuid": "e3a333f7-066c-4546-8a8e-b95f814c57e5",
        "organisation_type_id": 6,
        "name": "Presbyterian University College ALUMNI",
        "slug": "puc-alumni",
        "address": "",
        "city": "Abetifi",
        "state": "Eastern Region",
        "post_code": "00233",
        "country_id": 80,
        "currency_id": 80,
        "email": "edemar08@hotmail.com",
        "phone": "",
        "website": "",
        "logo": "https://files.memberz.org/img/org_54/account/20150927_298192_105013.jpg",
        "short_description": "This Presbyterian University College, Ghana, is envisaged as  “A University of excellence which blends modern trends that reflect Christian principles”.",
        "long_description": "The Presbyterian University College is conceived as a response to the challenge presented by the high demand for student admission in Ghanaian Universities (low access), the perceived lowering of academic standards and the erosion of moral and ethical values in the Ghanaian Society. It will relate its programmes to the developmental needs of Ghana in the 21st Century and beyond, in terms of training, research, extension and service. It will identify and fill important niches in the development of higher education in the country.",
        "mission": "The mission of the University is  ‘‘To design and implement relevant academic and Professional programmes of teaching, research and outreach for a global population within the context of Christian ethics that produce holistic human development.’’",
        "cover_photo": null,
        "member_account_id": 13,
        "organisation_member_count": 424,
        "organisation_account_count": 2,
        "discoverable": 1,
        "allow_public_join": 1,
        "default_public_join_category": null,
        "public_directory_enabled": 0,
        "locked": 1,
        "verified": 0,
        "verified_by": null,
        "created": "2015-01-24T20:41:36.000000Z",
        "modified": "2022-04-01T15:19:29.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 439,
        "recent_membership": "2018-02-26 15:46:38",
        "organisation_type": {
            "id": 6,
            "name": "Association",
            "organisation_count": 0
        }
    },
    {
        "id": 61,
        "uuid": "9644f817-552d-47f1-9761-ab7d581c712d",
        "organisation_type_id": 1,
        "name": "Calvary Methodist Church, Adabraka",
        "slug": "calvary-methodist-church-adabraka",
        "address": "Post Office Box 7628, Accra North",
        "city": "Accra",
        "state": "Greater Accra",
        "post_code": "",
        "country_id": 80,
        "currency_id": 80,
        "email": "info@calvarymethodistchurchghana.org",
        "phone": "+233302679317",
        "website": "http://www.calvarymethodistchurch.org",
        "logo": "https://files.memberz.org/img/org_61/account/20160419_838898_173241.jpg",
        "short_description": "A warm and inviting Church located in the center of the capital, Accra(Adabraka precisely). 90 years and more of Walking with Christ and birthing 5 daughter churches. This is the home Church of blessed individuals of the society. Calvary Meth Church looks forward to having you worship with us during the English service at 7.30am service on Sunday or the fore-noon Fante/ Twi Service at 9:30am.",
        "long_description": "A member of the Methodist Church Ghana with the vision to build a vibrant, spirit-filled and spirit-led church for the Holistic Transformation of the society.\r\n\r\nHer mission is to equip the church for ministry work through the demonstration of Christian Faith and Love.",
        "mission": "Equipping the Church to reach out the love of Christ to all.",
        "cover_photo": null,
        "member_account_id": 19,
        "organisation_member_count": 129,
        "organisation_account_count": 4,
        "discoverable": 1,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 1,
        "verified": 0,
        "verified_by": null,
        "created": "2015-06-09T11:38:19.000000Z",
        "modified": "2022-04-01T15:19:30.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 198,
        "recent_membership": "2019-08-09 16:55:02",
        "organisation_type": {
            "id": 1,
            "name": "Religious Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 75,
        "uuid": "cfabbf4d-8668-44d7-a810-057e7ef28f90",
        "organisation_type_id": 1,
        "name": "Weapons of Fire Deliverance Ministry Youth Fellowship",
        "slug": "weapons-of-fire-deliverance-ministry-youth-fellows",
        "address": "",
        "city": "Accra",
        "state": "Accra",
        "post_code": "00233",
        "country_id": 80,
        "currency_id": 80,
        "email": "mpkal29@gmail.com",
        "phone": "+233200170100",
        "website": "",
        "logo": null,
        "short_description": null,
        "long_description": null,
        "mission": null,
        "cover_photo": null,
        "member_account_id": 50,
        "organisation_member_count": 23,
        "organisation_account_count": 1,
        "discoverable": 1,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 0,
        "verified": 0,
        "verified_by": null,
        "created": "2015-07-02T19:48:03.000000Z",
        "modified": "2022-01-03T06:45:38.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 23,
        "recent_membership": "2015-07-07 23:45:03",
        "organisation_type": {
            "id": 1,
            "name": "Religious Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 76,
        "uuid": "88f9c442-c682-4b9d-9463-71a069ce1a9e",
        "organisation_type_id": 2,
        "name": "National Union of Baptist Students Alumni and Associates",
        "slug": "nubsaa",
        "address": "C/o Ghana Baptist Convention",
        "city": "Accra",
        "state": "Greater Accra",
        "post_code": "0302",
        "country_id": 80,
        "currency_id": 80,
        "email": "nubsaagh@gmail.com",
        "phone": "+233262118627",
        "website": "http://www.facebook.com/nubsaagh",
        "logo": "https://files.memberz.org/img/org_76/account/20180914_222160_081238.png",
        "short_description": "NUBSAA is the National Union of Baptist Students Alumni & Associates. NUBSAA was formed as a avenue for Baptist Students Alumni and Associates to support the Youth and Students Ministries of the Ghana Baptist Convention.",
        "long_description": "NUBSAA is the National Union of Baptist Students Alumni & Associates. NUBSAA was formed as a avenue for Baptist Students Alumni and Associates to support the Youth and Students Ministries of the Ghana Baptist Convention.",
        "mission": "",
        "cover_photo": null,
        "member_account_id": 15,
        "organisation_member_count": 162,
        "organisation_account_count": 4,
        "discoverable": 1,
        "allow_public_join": 1,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 1,
        "verified": 0,
        "verified_by": null,
        "created": "2015-07-04T11:49:08.000000Z",
        "modified": "2022-06-17T20:14:35.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 173,
        "recent_membership": "2022-07-15 20:28:43",
        "organisation_type": {
            "id": 2,
            "name": "Non-Profit Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 90,
        "uuid": "f8d339cc-cdc1-4629-a9bc-a807d158932b",
        "organisation_type_id": 2,
        "name": "GBC Prayer Army",
        "slug": "gbcpa",
        "address": "",
        "city": "Accra",
        "state": "GA",
        "post_code": "0233",
        "country_id": 80,
        "currency_id": 80,
        "email": "amaduny@yahoo.com",
        "phone": "+233243613648",
        "website": "",
        "logo": null,
        "short_description": null,
        "long_description": null,
        "mission": null,
        "cover_photo": null,
        "member_account_id": 26,
        "organisation_member_count": 102,
        "organisation_account_count": 2,
        "discoverable": 1,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 0,
        "verified": 1,
        "verified_by": null,
        "created": "2015-09-29T10:56:35.000000Z",
        "modified": "2022-01-03T06:45:38.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 278,
        "recent_membership": "2019-04-12 15:22:07",
        "organisation_type": {
            "id": 2,
            "name": "Non-Profit Organisation",
            "organisation_count": 0
        }
    },
    {
        "id": 91,
        "uuid": "a552c612-1050-4cbb-8b24-0ce511a5424a",
        "organisation_type_id": 3,
        "name": "Staff Org",
        "slug": "staff-org-42048",
        "address": "",
        "city": "Accra",
        "state": "GT Accra",
        "post_code": "",
        "country_id": 80,
        "currency_id": 80,
        "email": "senyafi@gmail.com",
        "phone": "+233244186650",
        "website": "",
        "logo": null,
        "short_description": null,
        "long_description": null,
        "mission": null,
        "cover_photo": null,
        "member_account_id": 526,
        "organisation_member_count": 6,
        "organisation_account_count": 1,
        "discoverable": 0,
        "allow_public_join": 0,
        "default_public_join_category": null,
        "public_directory_enabled": 1,
        "locked": 0,
        "verified": 0,
        "verified_by": null,
        "created": "2015-10-16T13:27:28.000000Z",
        "modified": "2022-01-03T06:45:38.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 6,
        "recent_membership": "2015-10-29 15:40:15",
        "organisation_type": {
            "id": 3,
            "name": "Business",
            "organisation_count": 0
        }
    },
    {
        "id": 100,
        "uuid": "1a1b222a-3fe0-4498-8947-7f51e411a51f",
        "organisation_type_id": 6,
        "name": "Asante Professionals Club",
        "slug": "apc",
        "address": "P.O.Box 979",
        "city": "Accra",
        "state": "Gt Accra",
        "post_code": "AD 979",
        "country_id": 80,
        "currency_id": 80,
        "email": "asanteprofessionalsclub@gmail.com",
        "phone": "+233266138286",
        "website": "",
        "logo": "https://files.memberz.org/img/org_100/account/20151126_301269_181025.jpg",
        "short_description": "We are a club of professionals who owe allegiance to the Golden Stool. We harness our various expertise for the good of Asanteman.",
        "long_description": "",
        "mission": "The Asante Professional Club is a network of Asante Professionals pursuing development in Asanteman.",
        "cover_photo": null,
        "member_account_id": 529,
        "organisation_member_count": 276,
        "organisation_account_count": 6,
        "discoverable": 1,
        "allow_public_join": 1,
        "default_public_join_category": null,
        "public_directory_enabled": 0,
        "locked": 1,
        "verified": 0,
        "verified_by": null,
        "created": "2015-11-26T17:49:54.000000Z",
        "modified": "2022-04-01T15:19:31.000000Z",
        "active": true,
        "trashed": 0,
        "membership_count": 319,
        "recent_membership": "2022-03-27 10:06:43",
        "organisation_type": {
            "id": 6,
            "name": "Association",
            "organisation_count": 0
        }
    }
]
 

requires authentication

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Organisation not found"
}
 

Request      

GET api/organisations/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/search?limit=3&page=1&sort=latest&fieldName=delectus" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "delectus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'delectus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Organisation not found"
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/organisations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Organisation

requires authentication

Example request:
curl --request POST \
    "http://api.memberz.test/api/organisations" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_type_id\": 317.1814497,
    \"name\": \"facilis\",
    \"slug\": \"fuga\",
    \"email\": \"paige37@example.org\",
    \"phone\": \"assumenda\",
    \"website\": \"https:\\/\\/www.mayert.net\\/quia-tempora-aliquid-optio-doloribus-nobis\",
    \"country_id\": 1.483,
    \"currency_id\": 2.67614,
    \"logo\": \"http:\\/\\/www.mcglynn.net\\/quibusdam-deserunt-nobis-rerum-soluta-eum-quaerat\",
    \"address\": \"voluptatem\",
    \"city\": \"aut\",
    \"state\": \"nobis\",
    \"post_code\": \"dolore\",
    \"short_description\": \"quisquam\",
    \"long_description\": \"culpa\",
    \"subscription_type_id\": 0,
    \"subscription_length\": 905.979007322
}"
const url = new URL(
    "http://api.memberz.test/api/organisations"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_type_id": 317.1814497,
    "name": "facilis",
    "slug": "fuga",
    "email": "paige37@example.org",
    "phone": "assumenda",
    "website": "https:\/\/www.mayert.net\/quia-tempora-aliquid-optio-doloribus-nobis",
    "country_id": 1.483,
    "currency_id": 2.67614,
    "logo": "http:\/\/www.mcglynn.net\/quibusdam-deserunt-nobis-rerum-soluta-eum-quaerat",
    "address": "voluptatem",
    "city": "aut",
    "state": "nobis",
    "post_code": "dolore",
    "short_description": "quisquam",
    "long_description": "culpa",
    "subscription_type_id": 0,
    "subscription_length": 905.979007322
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_type_id' => 317.1814497,
            'name' => 'facilis',
            'slug' => 'fuga',
            'email' => 'paige37@example.org',
            'phone' => 'assumenda',
            'website' => 'https://www.mayert.net/quia-tempora-aliquid-optio-doloribus-nobis',
            'country_id' => 1.483,
            'currency_id' => 2.67614,
            'logo' => 'http://www.mcglynn.net/quibusdam-deserunt-nobis-rerum-soluta-eum-quaerat',
            'address' => 'voluptatem',
            'city' => 'aut',
            'state' => 'nobis',
            'post_code' => 'dolore',
            'short_description' => 'quisquam',
            'long_description' => 'culpa',
            'subscription_type_id' => 0.0,
            'subscription_length' => 905.979007322,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/organisations

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

organisation_type_id   number   

Example: 317.1814497

name   string   

Example: facilis

slug   string  optional  

Example: fuga

email   string   

Must be a valid email address. Example: paige37@example.org

phone   string   

Example: assumenda

website   string  optional  

Must be a valid URL. Example: https://www.mayert.net/quia-tempora-aliquid-optio-doloribus-nobis

country_id   number   

Example: 1.483

currency_id   number  optional  

Example: 2.67614

logo   string  optional  

Must be a valid URL. Example: http://www.mcglynn.net/quibusdam-deserunt-nobis-rerum-soluta-eum-quaerat

address   string  optional  

Example: voluptatem

city   string  optional  

Example: aut

state   string  optional  

Example: nobis

post_code   string  optional  

Example: dolore

short_description   string  optional  

Example: quisquam

long_description   string  optional  

Example: culpa

subscription_type_id   number   

Example: 0

subscription_length   number   

Example: 905.979007322

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/organisations/14" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/14"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/14';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Organisation not found"
}
 

Request      

GET api/organisations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 14

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Organisation

requires authentication

Example request:
curl --request PUT \
    "http://api.memberz.test/api/organisations/21" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"organisation_type_id\": 16982198.49,
    \"name\": \"excepturi\",
    \"slug\": \"dolorem\",
    \"email\": \"ydoyle@example.com\",
    \"phone\": \"earum\",
    \"website\": \"http:\\/\\/www.marquardt.com\\/\",
    \"country_id\": 949.526179668,
    \"currency_id\": 14579.3392598,
    \"logo\": \"http:\\/\\/gulgowski.com\\/est-sit-ut-perspiciatis-enim-id-ad\",
    \"address\": \"nesciunt\",
    \"city\": \"quos\",
    \"state\": \"fugiat\",
    \"post_code\": \"recusandae\",
    \"short_description\": \"et\",
    \"long_description\": \"sed\"
}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "organisation_type_id": 16982198.49,
    "name": "excepturi",
    "slug": "dolorem",
    "email": "ydoyle@example.com",
    "phone": "earum",
    "website": "http:\/\/www.marquardt.com\/",
    "country_id": 949.526179668,
    "currency_id": 14579.3392598,
    "logo": "http:\/\/gulgowski.com\/est-sit-ut-perspiciatis-enim-id-ad",
    "address": "nesciunt",
    "city": "quos",
    "state": "fugiat",
    "post_code": "recusandae",
    "short_description": "et",
    "long_description": "sed"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'organisation_type_id' => 16982198.49,
            'name' => 'excepturi',
            'slug' => 'dolorem',
            'email' => 'ydoyle@example.com',
            'phone' => 'earum',
            'website' => 'http://www.marquardt.com/',
            'country_id' => 949.526179668,
            'currency_id' => 14579.3392598,
            'logo' => 'http://gulgowski.com/est-sit-ut-perspiciatis-enim-id-ad',
            'address' => 'nesciunt',
            'city' => 'quos',
            'state' => 'fugiat',
            'post_code' => 'recusandae',
            'short_description' => 'et',
            'long_description' => 'sed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/organisations/{id}

PATCH api/organisations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation. Example: 21

Body Parameters

organisation_type_id   number   

Example: 16982198.49

name   string   

Example: excepturi

slug   string  optional  

Example: dolorem

email   string   

Must be a valid email address. Example: ydoyle@example.com

phone   string   

Example: earum

website   string  optional  

Must be a valid URL. Example: http://www.marquardt.com/

country_id   number   

Example: 949.526179668

currency_id   number  optional  

Example: 14579.3392598

logo   string  optional  

Must be a valid URL. Example: http://gulgowski.com/est-sit-ut-perspiciatis-enim-id-ad

address   string  optional  

Example: nesciunt

city   string  optional  

Example: quos

state   string  optional  

Example: fugiat

post_code   string  optional  

Example: recusandae

short_description   string  optional  

Example: et

long_description   string  optional  

Example: sed

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/organisations/21" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/organisations/21"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/organisations/21';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/organisations/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the organisation. Example: 21

Permissions

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/permissions/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/permissions/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/permissions/search?limit=3&page=1&sort=latest&fieldName=esse" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "esse",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'esse',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/permissions?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/permissions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/permissions" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/permissions

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/permissions/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions/6';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/permissions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/permissions/aut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions/aut"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions/aut';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/permissions/{id}

PATCH api/permissions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the permission. Example: aut

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/permissions/qui" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/permissions/qui"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/permissions/qui';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/permissions/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   string   

The ID of the permission. Example: qui

SMS Account Messages

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_messages/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_account_messages/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_messages/search?limit=3&page=1&sort=latest&fieldName=ad" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "ad",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'ad',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_messages?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_account_messages

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Send Message

requires authentication

Adds a message to the queue to dispatch to the phone number

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_account_messages" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"module_sms_account_id\": 974154.51287,
    \"member_id\": 1542401.9621,
    \"to\": \"autem\",
    \"message\": \"dolor\",
    \"sent_by\": 385237175.6763388
}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "module_sms_account_id": 974154.51287,
    "member_id": 1542401.9621,
    "to": "autem",
    "message": "dolor",
    "sent_by": 385237175.6763388
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'module_sms_account_id' => 974154.51287,
            'member_id' => 1542401.9621,
            'to' => 'autem',
            'message' => 'dolor',
            'sent_by' => 385237175.6763388,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/sms_account_messages

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Body Parameters

module_sms_account_id   number   

Example: 974154.51287

member_id   number   

Example: 1542401.9621

to   string   

Example: autem

message   string   

Example: dolor

sent_by   number  optional  

Example: 385237175.67634

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_messages/20" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages/20"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages/20';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_account_messages/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 20

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Message

requires authentication

Updates an existing message before / after it has been sent

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_account_messages/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}" \
    --data "{
    \"module_sms_account_id\": 12.044,
    \"member_id\": 14099001,
    \"to\": \"qui\",
    \"message\": \"non\",
    \"sent_by\": 34.879794746
}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

let body = {
    "module_sms_account_id": 12.044,
    "member_id": 14099001,
    "to": "qui",
    "message": "non",
    "sent_by": 34.879794746
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages/6';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'json' => [
            'module_sms_account_id' => 12.044,
            'member_id' => 14099001.0,
            'to' => 'qui',
            'message' => 'non',
            'sent_by' => 34.879794746,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

PUT api/sms_account_messages/{id}

PATCH api/sms_account_messages/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account message. Example: 6

Body Parameters

module_sms_account_id   number   

Example: 12.044

member_id   number   

Example: 14099001

to   string   

Example: qui

message   string   

Example: non

sent_by   number  optional  

Example: 34.879794746

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_account_messages/14" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_messages/14"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_messages/14';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_account_messages/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account message. Example: 14

SMS Account Topups

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_topups/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_account_topups/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_topups/search?limit=3&page=1&sort=latest&fieldName=dolor" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "dolor",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'dolor',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_topups?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_account_topups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_account_topups" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/sms_account_topups

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_account_topups/15" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups/15"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups/15';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_account_topups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 15

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_account_topups/6" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups/6"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups/6';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/sms_account_topups/{id}

PATCH api/sms_account_topups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account topup. Example: 6

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_account_topups/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_account_topups/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_account_topups/2';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_account_topups/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account topup. Example: 2

SMS Accounts

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_accounts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_accounts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_accounts/search?limit=3&page=1&sort=latest&fieldName=qui" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "qui",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'qui',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_accounts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_accounts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/sms_accounts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_accounts/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts/11';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 11

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_accounts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/sms_accounts/{id}

PATCH api/sms_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_accounts/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_accounts/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_accounts/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_accounts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms account. Example: 1

SMS Broadcast

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcasts/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcasts/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcasts/search?limit=3&page=1&sort=latest&fieldName=quam" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "quam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'quam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcasts?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcasts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_broadcasts" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/sms_broadcasts

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcasts/16" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts/16"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 16

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_broadcasts/9" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts/9"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts/9';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/sms_broadcasts/{id}

PATCH api/sms_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms broadcast. Example: 9

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_broadcasts/13" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcasts/13"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcasts/13';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_broadcasts/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms broadcast. Example: 13

SMS Broadcast Lists

GET api/sms_broadcast_lists/filters

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists/filters" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/filters"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/filters';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcast_lists/filters

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

GET api/sms_broadcast_lists/preview/{smsBroadcastList_id}

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists/preview/156" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/preview/156"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/preview/156';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcast_lists/preview/{smsBroadcastList_id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

smsBroadcastList_id   integer   

The ID of the smsBroadcastList. Example: 156

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcast_lists/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists/search?limit=3&page=1&sort=latest&fieldName=ut" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "ut",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'ut',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_broadcast_lists

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_broadcast_lists" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/sms_broadcast_lists

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_broadcast_lists/3" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/3"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/3';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_broadcast_lists/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 3

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_broadcast_lists/156" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/156"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/156';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/sms_broadcast_lists/{id}

PATCH api/sms_broadcast_lists/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms broadcast list. Example: 156

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_broadcast_lists/156" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_broadcast_lists/156"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_broadcast_lists/156';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_broadcast_lists/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms broadcast list. Example: 156

SMS Credits

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_credits/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_credits/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_credits/search?limit=3&page=1&sort=latest&fieldName=natus" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "natus",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'natus',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_credits?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms_credits

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/sms_credits" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/sms_credits

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms_credits/5" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits/5"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits/5';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/sms_credits/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 5

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/sms_credits/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/sms_credits/{id}

PATCH api/sms_credits/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms credit. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/sms_credits/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms_credits/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms_credits/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/sms_credits/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the sms credit. Example: 1

SMS Summary

GET api/sms/summary

requires authentication

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/sms/summary" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/sms/summary"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/sms/summary';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/sms/summary

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Subscription Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/subscription_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/subscription_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/subscription_types/search?limit=3&page=1&sort=latest&fieldName=culpa" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "culpa",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'culpa',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/subscription_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/subscription_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/subscription_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/subscription_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/subscription_types/16" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types/16"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types/16';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/subscription_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 16

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/subscription_types/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types/11';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/subscription_types/{id}

PATCH api/subscription_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the subscription type. Example: 11

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/subscription_types/11" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/subscription_types/11"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/subscription_types/11';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/subscription_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the subscription type. Example: 11

System Setting Categories

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_setting_category/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/system_setting_category/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_setting_category/search?limit=3&page=1&sort=latest&fieldName=eos" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "eos",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'eos',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_setting_category?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/system_setting_category

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/system_setting_category" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/system_setting_category

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_setting_category/2" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category/2"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category/2';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/system_setting_category/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 2

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/system_setting_category/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/system_setting_category/{id}

PATCH api/system_setting_category/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the system setting category. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/system_setting_category/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_setting_category/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_setting_category/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/system_setting_category/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the system setting category. Example: 1

System Settings

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system/settings?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system/settings"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system/settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "data": [
        {
            "id": 10,
            "setting_type_category_id": 1,
            "name": "sms_credits",
            "type": "number",
            "description": "SMS Credits Available in System for Messaging",
            "value": "3259",
            "created": "2023-03-16T22:53:32.000000Z",
            "modified": "2024-09-25T07:00:02.000000Z"
        },
        {
            "id": 9,
            "setting_type_category_id": 1,
            "name": "try_new_platform",
            "type": "flag",
            "description": "Enable this to provide option for trying new angular platform",
            "value": "0",
            "created": "2022-03-04T17:48:56.000000Z",
            "modified": "2022-03-04T17:49:00.000000Z"
        },
        {
            "id": 8,
            "setting_type_category_id": 2,
            "name": "accept_slydepay_payments",
            "type": "flag",
            "description": "Enable this feature to accept payments via Slydepay",
            "value": "1",
            "created": "2016-06-04T06:06:01.000000Z",
            "modified": "2017-05-25T14:57:20.000000Z"
        }
    ],
    "links": {
        "first": "http://api.memberz.test/api/system/settings?page=1",
        "last": "http://api.memberz.test/api/system/settings?page=4",
        "prev": null,
        "next": "http://api.memberz.test/api/system/settings?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 4,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/system/settings?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "http://api.memberz.test/api/system/settings?page=2",
                "label": "2",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/system/settings?page=3",
                "label": "3",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/system/settings?page=4",
                "label": "4",
                "active": false
            },
            {
                "url": "http://api.memberz.test/api/system/settings?page=2",
                "label": "Next &raquo;",
                "active": false
            }
        ],
        "path": "http://api.memberz.test/api/system/settings",
        "per_page": 3,
        "to": 3,
        "total": 10
    }
}
 

Request      

GET api/system/settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_settings/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/system_settings/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_settings/search?limit=3&page=1&sort=latest&fieldName=sed" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "sed",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'sed',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_settings?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/system_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/system_settings" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/system_settings

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/system_settings/8" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings/8"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings/8';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/system_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 8

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/system_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/system_settings/{id}

PATCH api/system_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the system setting. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/system_settings/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/system_settings/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/system_settings/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/system_settings/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the system setting. Example: 1

Transaction Types

Count Resources

requires authentication

Returns a simple count of data in this resource

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/transaction_types/count" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types/count"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types/count';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/transaction_types/count

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

fieldName   string  optional  

Pass any field and value to search by e.g. name=John&email=any@aol.com. Search logic may use LIKE or = depending on field.

requires authentication

Allows searching for data in this resource using multiple options.

Options for searching

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/transaction_types/search?limit=3&page=1&sort=latest&fieldName=laboriosam" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types/search"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
    "fieldName": "laboriosam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types/search';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
            'fieldName' => 'laboriosam',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Get All

requires authentication

Returns a list of items in this resource and allows filtering the data based on fields in the database

Options for searching / filtering

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/transaction_types?limit=3&page=1&sort=latest" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types"
);

const params = {
    "limit": "3",
    "page": "1",
    "sort": "latest",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
        'query' => [
            'limit' => '3',
            'page' => '1',
            'sort' => 'latest',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/transaction_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

limit   string  optional  

Total items to return e.g. ?limit=15. Example: 3

page   integer  optional  

Page of items to return e.g. ?page=1. Example: 1

sort   string  optional  

Sorting options e.g. ?sort=field1:asc,field2:asc OR ?sort=latest/oldest. Example: latest

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

fieldName   string  optional  

Pass any field and value to filter results e.g. name=John&email=any@aol.com.

Create Resource

requires authentication

Create a new record of this resource in the database. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request POST \
    "http://api.memberz.test/api/transaction_types" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error message"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

POST api/transaction_types

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

View Resource

requires authentication

Returns information about a specific record in this resource. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request GET \
    --get "http://api.memberz.test/api/transaction_types/13" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types/13"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types/13';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

GET api/transaction_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The id of the resource to view Example: 13

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Update Resource

requires authentication

Updates the data of the record with the specified id. You can return related data or counts of related data in the response using the count and contain query params

Example request:
curl --request PUT \
    "http://api.memberz.test/api/transaction_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (400):


{
    "status": "error",
    "message": [
        "validation error messages"
    ]
}
 

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Example response (500):


{
    "status": "error",
    "message": "Details of error message"
}
 

Request      

PUT api/transaction_types/{id}

PATCH api/transaction_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the transaction type. Example: 1

Query Parameters

count   integer  optional  

Count related models. Alternatively with_count e.g. ?count=relation1,relation2.

contain   string  optional  

Contain data from related model e.g. ?contain=relation1,relation2.

Delete Resource

requires authentication

Deletes the record with the specified id

Example request:
curl --request DELETE \
    "http://api.memberz.test/api/transaction_types/1" \
    --header "Authorization: Bearer {auth-token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "X-Tenant-ID: {{tenant_id}}"
const url = new URL(
    "http://api.memberz.test/api/transaction_types/1"
);

const headers = {
    "Authorization": "Bearer {auth-token}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "X-Tenant-ID": "{{tenant_id}}",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'http://api.memberz.test/api/transaction_types/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {auth-token}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'X-Tenant-ID' => '{{tenant_id}}',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "status": "success",
    "message": "Resource deleted",
    "data": {
        "id": 1
    }
}
 

Example response (404):


{
    "status": "failed",
    "message": "Resource not found"
}
 

Request      

DELETE api/transaction_types/{id}

Headers

Authorization      

Example: Bearer {auth-token}

Content-Type      

Example: application/json

Accept      

Example: application/json

X-Tenant-ID      

Example: {{tenant_id}}

URL Parameters

id   integer   

The ID of the transaction type. Example: 1